Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp511770imm; Fri, 14 Sep 2018 01:57:53 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb7keUQiR+jwyCeZN28bLIqd2K6T9ryHC0G2jNmP/yj0f1kyiIb6GsF+llBQqurRjIcl7U/ X-Received: by 2002:a62:f0d:: with SMTP id x13-v6mr11328634pfi.221.1536915473285; Fri, 14 Sep 2018 01:57:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536915473; cv=none; d=google.com; s=arc-20160816; b=IWW9exS5dzZV428Ax/ahzqd/5l6DBhdylWyw9x4uaMUfLEzSPbSuzHjtWYQAsc56Pg fgZcPNMUWwJd5EKhPzQ4ORi6lBs1/bYaEiQo82oM6C4FZHfSbVSSBM3u/aVOpYV+bnhk O1/JEVgx+N217tMg4hBhAQE9VOLXbl28Ee7g9MogS99XAmVhCz/pTR48mhRlkskczLrI FNV1rQR6IFEuKCKF5/4/Am9OH0pC+dgGW2nWF1ahpMp+Kvaya8NX0eeXUF3klls396ah JohFxSmAvgur8LBGMI3cv/M4rLQiHkaRcCtKhTejhlxbAYT+V88hX0BSnDY8HtZ7ZxHM 91Tw== 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=nRAsTkxmhRzoYhpfLe7xkP8JVKRy7+i8KLCig5Sggsw=; b=G+UllBlBgcQTgRKEmZWAEgAPpM/b2fEKTrg2Q4uzF9D6YoDPYq8tJ3pkSA7NYd8yHV IiqVgRjfR8P56T0CAAEu9/URyPNbt4p9vbeSpUstJZmRSSVeY2drBqeNJW5+wv2Yvkd5 cCbJ/DYAPxJctB79ZDr+yQQxQeOchCgIz+HdHKdU/KLmEwMqfHQRSGRFmlrjQIv1dr76 BSLbS8+s1SKK5pyBfUVVAhBIgfMte1LR3j01PRUGqGxobhs4f/LlbhyAcaBpIoxnB+sv B7w5WWqYF2ZlNcPH86kyidB99dts/e8nCsOLomxNY1LGoiloepZt0ZkN1UwORKrUjzI1 Xjdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QFmLgdhZ; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v11-v6si6862359pfk.165.2018.09.14.01.57.37; Fri, 14 Sep 2018 01:57:53 -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=@linaro.org header.s=google header.b=QFmLgdhZ; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728089AbeINOJn (ORCPT + 99 others); Fri, 14 Sep 2018 10:09:43 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:40379 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727996AbeINOJn (ORCPT ); Fri, 14 Sep 2018 10:09:43 -0400 Received: by mail-it0-f68.google.com with SMTP id h23-v6so1592411ita.5 for ; Fri, 14 Sep 2018 01:56:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nRAsTkxmhRzoYhpfLe7xkP8JVKRy7+i8KLCig5Sggsw=; b=QFmLgdhZpzKxiI3xlP2GEnpCU87xvrTGUdDRDC8fWJjmkxovJkGdTaTrcxb7yBHrnd AyJtk1dkJYe/DQkIY1KiWjXvI20f+sWC5sXds2KlOGPnGPOFrQIRSd3thE3Wba7O9wf3 q7CTkmwl8eA5VWV6QRAYdfXeP/aDwVmfIGtJk= 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=nRAsTkxmhRzoYhpfLe7xkP8JVKRy7+i8KLCig5Sggsw=; b=OSnkhyrhIeojwl6TSMFWFkCDIF4jKpfOVv7YnX6g0NRhKE8f1BShmigeTkPFFYFzQZ iN8rJmwMnY61MWPOYk2cS9jEKYQ5jz1KdiGCEARTY1Vmx+COAaT9p8Ke/08VwqXd6T3n kUjTRjxjccWzJrsDEPvh3b6Tg2xpylsYv4uS5pw9yx3w94I4GMM/9p3/S3SQB48C1G5n jJG0FdOiUuAPNLpOiJdeufEwDteWS28kC+mIsaSj32EFw5qEQ/XmBFGS+9KhZZxERU3P WIxIWlSLGtuFHxXjFzIQzjoNdECIegDzDrkvTlfrOhbRK+L3hTtG8BBXw63noVn4qVO1 lQ+A== X-Gm-Message-State: APzg51BTLhzg2qViHYmHs4A4cxiyxhOwisAhZ3gkTJx0WYgbbngRsW4G zrY+9GWMNQRoXKnxwXwRuXZVbL8tAT5Ymdh1V9ReEGZa X-Received: by 2002:a24:7044:: with SMTP id f65-v6mr504404itc.62.1536915372011; Fri, 14 Sep 2018 01:56:12 -0700 (PDT) MIME-Version: 1.0 References: <20180913133704.15739-1-ricardo.ribalda@gmail.com> In-Reply-To: <20180913133704.15739-1-ricardo.ribalda@gmail.com> From: Linus Walleij Date: Fri, 14 Sep 2018 10:56:00 +0200 Message-ID: Subject: Re: [PATCH] gpiolib: Free the last requested descriptor To: Ricardo Ribalda Delgado Cc: "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , Timur Tabi , stable 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 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. Yours, Linus Walleij