sysfs_notify is only possible on file attributes
authorNick Dyer <nick.dyer@itdev.co.uk>
Fri, 7 Jun 2013 14:45:13 +0000 (15:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Jun 2013 23:05:50 +0000 (16:05 -0700)
commitfc60bb8339b66183f40ea9a001538c958f6d2c9e
treeed6e5bea8971fb25642606872c98b1f3f619abfe
parentd6c8aa3906d5d0e4012b9811d6e0928dc7b4cbaf
sysfs_notify is only possible on file attributes

If sysfs_notify is called on a binary attribute, bad things can
happen, so prevent it.

Note, no in-kernel usage of this is currently present, but in the
future, it's good to be safe.

Changes in V2:
- Also ignore sysfs_notify on dirs, links
- Use WARN_ON rather than silently failing
- Compiled and tested (huge apologies about first submission)

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/sysfs/file.c
This page took 0.024376 seconds and 5 git commands to generate.