Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3786128imm; Mon, 17 Sep 2018 03:15:05 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbFDZXowv2wEzqU5bRaZ1KkoR/5A0BDOkYNhGkyfTGflVZhb+qmBNokmCMvkaA5JQBrudGg X-Received: by 2002:a17:902:b40e:: with SMTP id x14-v6mr23813847plr.314.1537179305860; Mon, 17 Sep 2018 03:15:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537179305; cv=none; d=google.com; s=arc-20160816; b=tC7V2jbKCtqUK5nNgBQwtfpRoeLBojo/BtaDf0plsCOxpGygAO5t33Hjgtc2IMqAEX 4dwRXN7IWmJCWhgiRTKdjzS+0pX09oDDp9RhGwEXh3+i54vxjwWINPdl4Vud9xAZc90Y mi/FBlXNKYK96NL4QoHQ44AjDFSOSMAwMAsPa83EU6gnlDgqPof/9JnU9l8pEzFW7EJr 53FrATnsV903y6gpwFS/ut72ua1o641vzjiabAyhJlHzCg+Q5PFTm6SneQK1zNK5YYFX 469pFqh6/Og11vE2BiakYvSMoYrrj64aaARQ79xywx6z9a0vVNaCV7j5V3UWvSuGvobN MOBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=9SqPlVUxQy+vbuNcH1v7ijfG5njf3uUfvXLX7FXDlak=; b=UThmxga6g8dq72Ixge/0CvGqJPFF5FFc5hK/6if+s/TbKNA1V3aI4vqulo53eulrQJ cve1q2SNVvyt0fPbbjRS/z/sXoluIhWPozR2Lc343YFW/4tEazX6e1tik667BZqjdkL9 MVFzCbvFhSIMUgQXVk2sxcZ3yDSBhA9h6KIExqPBokCbEx3qkSp0Z2jDaFS4+K/fObhJ hQgsc/c/wNJDIwtoTEXu1k82Ub/y0z7QFI7kMJisiWnZmG8Ege9r2OyWXgfwEtwrhBaO NFtzkND/ZvTVcjoV7X0T/l2FGSCr08AXF29yXkU+jtwncatM2KhKiLUZUyO2SreBsYQC NZrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Hww4X8VK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q16-v6si14374144pgg.619.2018.09.17.03.14.50; Mon, 17 Sep 2018 03:15:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Hww4X8VK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727660AbeIQPlU (ORCPT + 99 others); Mon, 17 Sep 2018 11:41:20 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:42343 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726169AbeIQPlU (ORCPT ); Mon, 17 Sep 2018 11:41:20 -0400 Received: by mail-lj1-f195.google.com with SMTP id f1-v6so12632708ljc.9; Mon, 17 Sep 2018 03:14:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9SqPlVUxQy+vbuNcH1v7ijfG5njf3uUfvXLX7FXDlak=; b=Hww4X8VKsMvBy2IVBcc4LRmZ45b7vcmDv0tvbN2q9QjtaBTcpcSlMNGlTI+Qt2ed97 un493KxCZZvcRC7DTuFUDTLvmEjVc0Bu8bY8bgM6YkLfwvHYeKj9EyHFVUyn0k9JBazj HHwH7kpSyQLW96ehcfq7Fkc+4lcMNKXQh0mHpOQdXshEZDCseJ9L5zy5OWO37Jaykp9G 0v3IYtRx5kM/GS1MqdvN+eczQYZWZKLwSKDiq4+hYcHFZ9di+wSf/Fd6tXMUisLoQILL 1NX/lSlKY2d9yeoi+VqWIVFwd82ffwLSajXXY1buI+RyfLVZqyZMHbpXMyGMY61MUTPk 2foQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9SqPlVUxQy+vbuNcH1v7ijfG5njf3uUfvXLX7FXDlak=; b=ZbCK1as50xVqnZUh+foY55ti2TGqE5gRda3h+waNd0vaWXGW8gA71dmIbGR6HdYq2V xlQPD0tqFWnV4z0GQXeMuBt+HFXU5oD7OL9iJk7/TvvtEdeupUXplQeKYd+rTvZTX7/S 4vuB16pnQrif06UMTlc/u5iQHfIz7bU7M2Q31l87lhQ2yMkZ0nPP7xJALcBa8wnNx0Ym TZNwZoXqC78r3LEq93FQnN80ewfJy0pKt4zX6nkOdDPA9hV83cNFIijgdRFO9VIKFtay NnR/AcfFzCB3yrk43dCy1YXJNkAMMG1/7tAvkrOqllP1vzqCTKBYeF6zHMHsGR6E5ka4 9OWw== X-Gm-Message-State: APzg51CbbEV7iyMKxVyZdTi15p2MVOymGQkuhrzoGrejTYu5Bn9/9a/H mpJqgr2k1GS2+ZxUA0CUW5ROdfdrcJ2qP+jEgeJZHL1r X-Received: by 2002:a2e:680a:: with SMTP id c10-v6mr15288467lja.59.1537179274332; Mon, 17 Sep 2018 03:14:34 -0700 (PDT) MIME-Version: 1.0 References: <20180913133704.15739-1-ricardo.ribalda@gmail.com> In-Reply-To: From: Ricardo Ribalda Delgado Date: Mon, 17 Sep 2018 12:14:17 +0200 Message-ID: Subject: Re: [PATCH] gpiolib: Free the last requested descriptor To: Linus Walleij Cc: linux-gpio@vger.kernel.org, LKML , Timur Tabi , stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus On Fri, Sep 14, 2018 at 10:56 AM Linus Walleij wrote: > > On Thu, Sep 13, 2018 at 3:37 PM Ricardo Ribalda Delgado > wrote: > > > The current code only frees N-1 gpios if an error occurs during > > gpiod_set_transitory, gpiod_direction_output or gpiod_direction_input. > > Leading to gpios that cannot be used by userspace nor other drivers. > > > > Cc: Timur Tabi > > Cc: stable@vger.kernel.org > > Fixes: ab3dbcf78f60f46d ("gpioib: do not free unrequested descriptors) > > Signed-off-by: Ricardo Ribalda Delgado > > Patch applied for fixes with Jan's Reported-by tag. Just a heads-up I haven't seem the patch on your kernel tree at https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git/refs/heads it is probably on your computer tree, but I wanted to make sure the patch is not lost in the wind :P Thanks! > > Yours, > Linus Walleij -- Ricardo Ribalda