All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Johan Hovold <johan@kernel.org>
Subject: [PATCH 0/3] gpio: sysfs: fix attribute leaks and races
Date: Tue, 13 Jan 2015 13:00:03 +0100	[thread overview]
Message-ID: <1421150406-20255-1-git-send-email-johan@kernel.org> (raw)

Here are three more patches for 3.19 fixing some long-standing memory
leaks and races (with userspace) in the gpio sysfs-interface
implementation.

The memory leaks are marked for stable, but I'll need to backport them
to pre-3.18 kernels once they are upstream due to commit 0eb4c6c2671c
("gpio: move sysfs support to its own file").

I chose not to mark the final patch for stable as the attribute-creation
race with userspace (e.g. udev rule) is not as critical (and patch a bit
more invasive).

Please note that these patches will cause a conflict with 3511ee7b3312
("gpio: lib-sysfs: Add 'wakeup' attribute") in gpio/devel, which adds
yet another device attribute without ever removing it. Unless the commit
in question can be reverted, that leak could be fixed as part of the
merge resolution, I guess.

Johan


Johan Hovold (3):
  gpio: sysfs: fix gpio-chip device-attribute leak
  gpio: sysfs: fix gpio device-attribute leak
  gpio: sysfs: fix gpio attribute-creation race

 drivers/gpio/gpiolib-sysfs.c | 92 +++++++++++++++++++++++++-------------------
 drivers/gpio/gpiolib.h       |  1 +
 2 files changed, 53 insertions(+), 40 deletions(-)

-- 
2.0.5


             reply	other threads:[~2015-01-13 12:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13 12:00 Johan Hovold [this message]
2015-01-13 12:00 ` [PATCH 1/3] gpio: sysfs: fix gpio-chip device-attribute leak Johan Hovold
2015-01-25  9:25   ` Alexandre Courbot
2015-01-13 12:00 ` [PATCH 2/3] gpio: sysfs: fix gpio " Johan Hovold
2015-01-25  9:27   ` Alexandre Courbot
2015-01-25  9:30     ` Alexandre Courbot
2015-01-13 12:00 ` [PATCH 3/3] gpio: sysfs: fix gpio attribute-creation race Johan Hovold
2015-01-25  9:33   ` Alexandre Courbot
2015-01-25 10:16     ` Johan Hovold
2015-01-15 16:33 ` [PATCH 0/3] gpio: sysfs: fix attribute leaks and races Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1421150406-20255-1-git-send-email-johan@kernel.org \
    --to=johan@kernel.org \
    --cc=gnurou@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.