aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/rt2860/common/cmm_data_2860.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2009-09-15 16:05:51 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2009-10-22 15:11:59 -0700
commit5b78a7630478e3e10c6d3ca53b2cffbee4aa0b5b (patch)
treef4186dfaa74a483bbfbcf322a71e63e3eb84ff1d /drivers/staging/rt2860/common/cmm_data_2860.c
parent0d4b093b89cf8aab0d478e6545c078a5dc08f73d (diff)
sysfs: Allow sysfs_notify_dirent to be called from interrupt context.
commit 83db93f4de2d9ae441a491d1dc61c2204f0195de upstream. sysfs_notify_dirent is a simple atomic operation that can be used to alert user-space that new data can be read from a sysfs attribute. Unfortunately it cannot currently be called from non-process context because of its use of spin_lock which is sometimes taken with interrupts enabled. So change all lockers of sysfs_open_dirent_lock to disable interrupts, thus making sysfs_notify_dirent safe to be called from non-process context (as drivers/md does in md_safemode_timeout). sysfs_get_open_dirent is (documented as being) only called from process context, so it uses spin_lock_irq. Other places use spin_lock_irqsave. The usage for sysfs_notify_dirent in md_safemode_timeout was introduced in 2.6.28, so this patch is suitable for that and more recent kernels. Reported-by: Joel Andres Granados <jgranado@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rt2860/common/cmm_data_2860.c')
0 files changed, 0 insertions, 0 deletions