linux/drivers
Hans de Goede e907df3272 watchdog: Add support for dynamically allocated watchdog_device structs
If a driver's watchdog_device struct is part of a dynamically allocated
struct (which it often will be), merely locking the module is not enough,
even with a drivers module locked, the driver can be unbound from the device,
examples:
1) The root user can unbind it through sysfd
2) The i2c bus master driver being unloaded for an i2c watchdog

I will gladly admit that these are corner cases, but we still need to handle
them correctly.

The fix for this consists of 2 parts:
1) Add ref / unref operations, so that the driver can refcount the struct
   holding the watchdog_device struct and delay freeing it until any
   open filehandles referring to it are closed
2) Most driver operations will do IO on the device and the driver should not
   do any IO on the device after it has been unbound. Rather then letting each
   driver deal with this internally, it is better to ensure at the watchdog
   core level that no operations (other then unref) will get called after
   the driver has called watchdog_unregister_device(). This actually is the
   bulk of this patch.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2012-05-30 07:55:31 +02:00
..
accessibility
acpi Merge branch 'x86-trampoline-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-05-29 20:14:53 -07:00
amba arm-soc: driver specific updates 2012-05-26 12:22:27 -07:00
ata arm-soc: clock driver changes 2012-05-26 12:42:29 -07:00
atm
auxdisplay
base mm: fix off-by-one bug in print_nodes_state() 2012-05-29 16:22:19 -07:00
bcma Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-24 11:54:29 -07:00
block Autogenerated GPG tag for Rusty D1ADB8F1: 15EE 8D6C AB0E 7F0C F999 BFCB D920 0E6C D1AD B8F1 2012-05-21 20:20:23 -07:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-24 11:54:29 -07:00
cdrom
char Merge branch 'drm-core-next' of git://people.freedesktop.org/~airlied/linux 2012-05-24 12:42:54 -07:00
clk arm-soc: soc specific changes, part 2 2012-05-26 13:05:55 -07:00
clocksource
connector
cpufreq
cpuidle
crypto arm-soc: clock driver changes 2012-05-26 12:42:29 -07:00
dca
devfreq Power management updates for 3.5 2012-05-23 14:07:06 -07:00
dio
dma arm-soc: device tree conversions, part 2 2012-05-26 12:57:47 -07:00
edac Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac 2012-05-29 18:32:37 -07:00
eisa
extcon Driver core pull for 3.5-rc1 2012-05-22 16:02:13 -07:00
firewire IEEE 1394 (FireWire) subsystem updates post v3.4: 2012-05-24 12:57:47 -07:00
firmware
gpio Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2012-05-29 18:27:19 -07:00
gpu Merge branch 'drm-core-next' of git://people.freedesktop.org/~airlied/linux 2012-05-24 12:42:54 -07:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-05-22 19:22:50 -07:00
hsi
hv Driver core pull for 3.5-rc1 2012-05-22 16:02:13 -07:00
hwmon hwmon updates for 3.5-rc1 2012-05-23 14:15:09 -07:00
hwspinlock
i2c Merge branch 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux 2012-05-26 13:35:03 -07:00
ide
idle
ieee802154
iio
infiniband InfiniBand/RDMA changes for the 3.5 merge window: 2012-05-21 17:54:55 -07:00
input MFD changes for 3.5 2012-05-29 11:53:11 -07:00
iommu arm-soc: driver specific updates 2012-05-26 12:22:27 -07:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-24 11:54:29 -07:00
leds leds: add LM3533 LED driver 2012-05-29 16:22:32 -07:00
lguest
macintosh
md md updates for 3.5 2012-05-23 17:08:40 -07:00
media arm-soc: clock driver changes 2012-05-26 12:42:29 -07:00
memory
memstick
message MCA: delete all remaining traces of microchannel bus support. 2012-05-17 19:06:13 -04:00
mfd MFD changes for 3.5 2012-05-29 11:53:11 -07:00
misc MFD changes for 3.5 2012-05-29 11:53:11 -07:00
mmc arm-soc: device tree conversions, part 2 2012-05-26 12:57:47 -07:00
mtd Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2012-05-29 18:27:19 -07:00
net arm-soc: clock driver changes 2012-05-26 12:42:29 -07:00
nfc
nubus
of Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2012-05-29 18:27:19 -07:00
oprofile
parisc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-05-22 19:22:50 -07:00
parport Driver core pull for 3.5-rc1 2012-05-22 16:02:13 -07:00
pci Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2012-05-29 18:27:19 -07:00
pcmcia
pinctrl arm-soc: soc specific changes, part 2 2012-05-26 13:05:55 -07:00
platform backlight: initialize struct backlight_properties properly 2012-05-29 16:22:30 -07:00
pnp
power MFD changes for 3.5 2012-05-29 11:53:11 -07:00
pps
ps3
ptp Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-05-22 19:22:50 -07:00
rapidio
regulator MFD changes for 3.5 2012-05-29 11:53:11 -07:00
remoteproc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-05-22 19:22:50 -07:00
rpmsg
rtc drivers/rtc/rtc-s3c.c: fix compiler warning 2012-05-29 16:22:34 -07:00
s390 Merge branch 'next' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2012-05-24 16:17:30 -07:00
sbus
scsi Merge branch 'delete-mca' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2012-05-23 17:12:06 -07:00
sfi
sh sh: intc: Kill off special reservation interface. 2012-05-22 19:07:55 +09:00
sn
spi arm-soc: soc specific changes, part 2 2012-05-26 13:05:55 -07:00
ssb
staging mm/fs: route MADV_REMOVE to FALLOC_FL_PUNCH_HOLE 2012-05-29 16:22:22 -07:00
target Merge branch 'sbp-target-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2012-05-23 16:52:27 -07:00
tc
thermal
tty Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2012-05-29 18:27:19 -07:00
uio
usb arm-soc: clock driver changes 2012-05-26 12:42:29 -07:00
uwb
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-16 22:17:37 -04:00
video backlight: tosa_lcd: use devm_ functions 2012-05-29 16:22:31 -07:00
virt
virtio virtio-mmio: Devices parameter parsing 2012-05-22 12:16:15 +09:30
vlynq
vme
w1 arm-soc: clock driver changes 2012-05-26 12:42:29 -07:00
watchdog watchdog: Add support for dynamically allocated watchdog_device structs 2012-05-30 07:55:31 +02:00
xen Merge branch 'x86-trampoline-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-05-29 20:14:53 -07:00
zorro
Kconfig Staging tree pull request for 3.5-rc1 2012-05-22 16:34:21 -07:00
Makefile arm-soc: driver specific updates 2012-05-26 12:22:27 -07:00