linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/13] leds: fix attribute-creation races
@ 2014-06-25 17:08 Johan Hovold
  2014-06-25 17:08 ` [PATCH 01/13] leds: add led-class attribute-group support Johan Hovold
                   ` (13 more replies)
  0 siblings, 14 replies; 21+ messages in thread
From: Johan Hovold @ 2014-06-25 17:08 UTC (permalink / raw)
  To: Bryan Wu, Richard Purdie
  Cc: Dmitry Torokhov, Greg Kroah-Hartman, linux-input, linux-kernel,
	linux-leds, Janne Kanniainen, Jiri Kosina, Bjørn Mork,
	Johan Hovold

LED-class device attributes should be created using the attribute groups
of struct device, rather than be added manually after the device has
been registered in order to avoid racing with userspace.

The first patch adds an attribute groups field to struct led_classdev,
which is used during registration to add device attributes in a
race-free manner.  

The remaining patches convert the current racy LED-device attribute
creations to use the new facility. Hopefully my grep-patterns have
caught most instances. Note that this also tends to simplify probe error
paths.

The lp55xx-common failed to remove the attribute group it is currently
creating, something which is fixed separately.

Note that this series include one driver from drivers/input/keyboard.

The individual led-driver patches have been compile tested only.

Johan


Johan Hovold (13):
  leds: add led-class attribute-group support
  leds: lm3550: fix attribute-creation race
  leds: lm3533: fix attribute-creation race
  leds: lm355x: fix attribute-creation race
  leds: lm3642: fix attribute-creation race
  leds: max8997: fix attribute-creation race
  leds: netxbig: fix attribute-creation race
  leds: ns2: fix attribute-creation race
  leds: ss4200: fix attribute-creation race
  leds: wm831x-status: fix attribute-creation race
  input: lm8323: fix attribute-creation race
  leds: lp55xx-common: fix sysfs entry leak
  leds: lp55xx-common: fix attribute-creation race

 drivers/input/keyboard/lm8323.c   | 22 +++++++++-------------
 drivers/leds/led-class.c          |  5 +++--
 drivers/leds/leds-lm3530.c        | 20 +++++++-------------
 drivers/leds/leds-lm3533.c        | 20 ++++++++------------
 drivers/leds/leds-lm355x.c        | 21 +++++++++------------
 drivers/leds/leds-lm3642.c        | 30 ++++++++++++++----------------
 drivers/leds/leds-lp55xx-common.c | 20 +++-----------------
 drivers/leds/leds-max8997.c       | 16 +++++++---------
 drivers/leds/leds-netxbig.c       | 26 ++++++++++++--------------
 drivers/leds/leds-ns2.c           | 16 +++++++---------
 drivers/leds/leds-ss4200.c        | 14 +++++++++-----
 drivers/leds/leds-wm831x-status.c | 23 +++++++++--------------
 include/linux/leds.h              |  2 ++
 13 files changed, 99 insertions(+), 136 deletions(-)

-- 
1.8.5.5

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2014-06-30 23:06 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-25 17:08 [PATCH 00/13] leds: fix attribute-creation races Johan Hovold
2014-06-25 17:08 ` [PATCH 01/13] leds: add led-class attribute-group support Johan Hovold
2014-06-25 17:08 ` [PATCH 02/13] leds: lm3550: fix attribute-creation race Johan Hovold
2014-06-25 17:08 ` [PATCH 03/13] leds: lm3533: " Johan Hovold
2014-06-25 17:08 ` [PATCH 04/13] leds: lm355x: " Johan Hovold
2014-06-25 17:08 ` [PATCH 05/13] leds: lm3642: " Johan Hovold
2014-06-25 17:08 ` [PATCH 06/13] leds: max8997: " Johan Hovold
2014-06-25 17:08 ` [PATCH 07/13] leds: netxbig: " Johan Hovold
2014-06-25 22:30   ` Bryan Wu
2014-06-25 17:08 ` [PATCH 08/13] leds: ns2: " Johan Hovold
2014-06-25 17:08 ` [PATCH 09/13] leds: ss4200: " Johan Hovold
2014-06-25 17:08 ` [PATCH 10/13] leds: wm831x-status: " Johan Hovold
2014-06-25 17:08 ` [PATCH 11/13] input: lm8323: " Johan Hovold
2014-06-25 22:45   ` Bryan Wu
2014-06-27 18:50   ` Dmitry Torokhov
2014-06-30 23:06     ` Bryan Wu
2014-06-25 17:08 ` [PATCH 12/13] leds: lp55xx-common: fix sysfs entry leak Johan Hovold
2014-06-25 17:08 ` [PATCH 13/13] leds: lp55xx-common: fix attribute-creation race Johan Hovold
2014-06-25 22:46 ` [PATCH 00/13] leds: fix attribute-creation races Bryan Wu
2014-06-26 23:25   ` Greg Kroah-Hartman
2014-06-27 10:05     ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).