1
0
Fork 0
alistair23-linux/drivers
Alan Stern 356c05d58a sysfs: get rid of some lockdep false positives
This patch (as1554) fixes a lockdep false-positive report.  The
problem arises because lockdep is unable to deal with the
tree-structured locks created by the device core and sysfs.

This particular problem involves a sysfs attribute method that
unregisters itself, not from the device it was called for, but from a
descendant device.  Lockdep doesn't understand the distinction and
reports a possible deadlock, even though the operation is safe.

This is the sort of thing that would normally be handled by using a
nested lock annotation; unfortunately it's not feasible to do that
here.  There's no sensible way to tell sysfs when attribute removal
occurs in the context of a parent attribute method.

As a workaround, the patch adds a new flag to struct attribute
telling sysfs not to inform lockdep when it acquires a readlock on a
sysfs_dirent instance for the attribute.  The readlock is still
acquired, but lockdep doesn't know about it and hence does not
complain about impossible deadlock scenarios.

Also added are macros for static initialization of attribute
structures with the ignore_lockdep flag set.  The three offending
attributes in the USB subsystem are converted to use the new macros.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Tejun Heo <tj@kernel.org>
CC: Eric W. Biederman <ebiederm@xmission.com>
CC: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14 12:19:56 -07:00
..
accessibility
acpi acpi: use KERN_CONT in printk() continuation lines 2012-05-08 08:55:26 -07:00
amba ARM: 7366/3: amba: Remove AMBA level regulator support 2012-04-13 14:04:08 +01:00
ata libata: forbid port runtime pm by default, fixing regression 2012-04-18 14:33:25 -04:00
atm Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
auxdisplay
base Driver Core: don't oops with unregistered driver in driver_find_device() 2012-05-14 08:46:01 -07:00
bcma bcma: use fallback sprom if no on chip sprom is available 2012-04-16 13:32:01 -04:00
block Fixes in various components: 2012-04-20 11:31:00 -07:00
bluetooth Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth 2012-04-09 15:47:49 -04:00
cdrom
char printk - fix compilation for CONFIG_PRINTK=n 2012-05-09 15:51:09 -07:00
clk
clocksource Revert "clocksource: Load the ACPI PM clocksource asynchronously" 2012-04-12 00:05:05 +02:00
connector
cpufreq cpufreq: OMAP: fix build errors: depends on ARCH_OMAP2PLUS 2012-04-13 17:57:40 -07:00
cpuidle Merge branches 'idle-fix' and 'misc' into release 2012-04-06 21:48:59 -04:00
crypto crypto: talitos - properly lock access to global talitos registers 2012-04-09 15:13:40 +08:00
dca
devfreq ARM: global cleanups 2012-03-27 16:03:32 -07:00
dio
dma Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma 2012-04-26 15:33:36 -07:00
edac Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2012-04-06 17:56:20 -07:00
eisa
extcon Extcon: add MAX8997 extcon driver 2012-05-09 15:14:19 -07:00
firewire Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
firmware
gpio gpiolib: Convert to devres_release() 2012-05-04 16:33:17 -07:00
gpu drm/i915: Set the Stencil Cache eviction policy to non-LRA mode. 2012-04-28 08:05:15 +01:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2012-04-20 10:39:33 -07:00
hsi HSI: hsi_char: Remove max_data_size from sysfs 2012-04-23 14:23:32 +03:00
hv Drivers: hv: util: Properly handle version negotiations. 2012-05-14 08:59:31 -07:00
hwmon hwmon: (fam15h_power) Fix pci_device_id array 2012-04-26 08:40:08 -07:00
hwspinlock
i2c i2c: prevent spurious interrupt on Designware controllers 2012-04-10 08:09:03 -07:00
ide Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
idle simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
ieee802154
infiniband A few fixes for regressions introduced in 3.4-rc1: 2012-04-26 15:35:35 -07:00
input mfd: Convert twl6040 to i2c driver, and separate it from twl core 2012-04-16 16:45:34 +02:00
iommu Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
isdn tty and serial fixes for 3.4-rc2 2012-04-12 15:36:33 -07:00
leds leds-atmel-pwm.c: Make pwmled_probe() __devinit 2012-04-17 16:29:31 +02:00
lguest
macintosh Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
mca
md md: fix possible corruption of array metadata on shutdown. 2012-04-24 10:23:16 +10:00
media Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-04-21 12:43:23 -07:00
memory memory: tegra{20,30}-mc: Use dev_err_ratelimited() 2012-05-14 08:47:11 -07:00
memstick memstick: remove the second argument of k[un]map_atomic() 2012-03-20 21:48:19 +08:00
message Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
mfd mfd: Fix modular builds of rc5t583 regulator support 2012-04-16 21:27:07 +02:00
misc misc: MAX8997: Remove max8997-muic driver 2012-05-09 15:15:59 -07:00
mmc Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma 2012-04-26 15:33:36 -07:00
mtd Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma 2012-04-26 15:33:36 -07:00
net drivers/net: Do not free an IRQ if its request failed 2012-04-21 16:41:11 -04:00
nfc
nubus Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
of gpio: Fix range check in of_gpio_simple_xlate() 2012-04-10 14:20:56 -06:00
oprofile simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
parisc Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
parport parport: use KERN_CONT in printk() continuation lines 2012-05-08 08:55:26 -07:00
pci Merge branch 'for-v3.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2012-04-27 19:32:37 -07:00
pcmcia Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia 2012-03-29 16:00:48 -07:00
pinctrl pinctrl: implement pinctrl_check_ops 2012-04-11 09:31:02 +02:00
platform Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-26 15:24:45 -07:00
pnp Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-03-30 16:45:39 -07:00
power Various small bugfixes and enhancements, plus two new drivers: 2012-03-30 16:09:02 -07:00
pps
ps3
ptp
rapidio
regulator regulator: Fix a build warning in the anatop driver for 3.4 2012-04-10 10:26:41 -07:00
remoteproc simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
rpmsg
rtc drivers/rtc/rtc-ds1307.c: fix BUG shown with lock debugging enabled 2012-04-25 21:26:34 -07:00
s390 [S390] s390/char/vmur.c: fix memory leak 2012-04-11 14:28:24 +02:00
sbus Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
scsi SCSI: Fix error handling when no ULD is attached 2012-04-15 11:08:53 -07:00
sfi
sh SuperH updates for 3.4 merge window 2012-03-30 00:09:17 -07:00
sn
spi spi/spi-bfin5xx: Fix flush of last bit after each spi transfer 2012-04-27 12:20:39 -06:00
ssb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-03-20 21:04:47 -07:00
staging Merge 3.4-rc5 into driver-core-next 2012-05-02 14:33:37 -07:00
target tcm_fc: Do not free tpg structure during wq allocation failure 2012-04-06 18:57:05 -07:00
tc
thermal thermal: Fix for setting the thermal zone mode to enable/disable 2012-03-22 01:10:18 -04:00
tty drivers/tty/amiserial.c: add missing tty_unlock 2012-04-19 19:15:35 -07:00
uio
usb sysfs: get rid of some lockdep false positives 2012-05-14 12:19:56 -07:00
uwb uwb: fix error handling 2012-04-18 13:15:51 -07:00
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-04-22 21:02:57 -07:00
video blackfin: fix compile error in bfin-lq035q1-fb.c 2012-04-26 14:46:51 -04:00
virt
virtio virtio_balloon: fix handling of PAGE_SIZE != 4k 2012-04-15 11:51:06 +03:00
vlynq
w1 w1: w1_ds2408.c: quite sparse noise about using plaing integer as NULL pointer 2012-05-04 16:25:30 -07:00
watchdog hpwdt: Only BYTE reads/writes to WD Timer port 0x72 2012-04-26 14:38:07 +02:00
xen xen/acpi: Workaround broken BIOSes exporting non-existing C-states. 2012-04-26 22:07:28 -04:00
zorro
Kconfig memory: emif: add basic infrastructure for EMIF driver 2012-05-02 00:10:49 -07:00
Makefile memory: emif: add basic infrastructure for EMIF driver 2012-05-02 00:10:49 -07:00