remarkable-linux/drivers
Guenter Roeck 60403f7a4d watchdog: Fix race condition in registration code
A race condition exists when registering the first watchdog device.
Sequence of events:

- watchdog_register_device calls watchdog_dev_register
- watchdog_dev_register creates the watchdog misc device by calling
  misc_register.
  At that time, the matching character device (/dev/watchdog0) does not yet
  exist, and old_wdd is not set either.
- Userspace gets an event and opens /dev/watchdog
- watchdog_open is called and sets wdd = old_wdd, which is still NULL,
  and tries to dereference it. This causes the kernel to panic.

Seen with systemd trying to open /dev/watchdog immediately after
it was created.

Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Arkadiusz Miskiewicz <arekm@maven.pl>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2013-05-09 08:13:41 +02:00
..
accessibility
acpi Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
amba
ata ARM: arm-soc: late cleanups 2013-05-07 11:22:14 -07:00
atm atm: he: use mdelay instead of large udelay constants 2013-04-29 13:26:48 -04:00
auxdisplay
base Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2013-05-01 13:20:04 -07:00
bcma
block Merge branch 'for-3.10/drivers' of git://git.kernel.dk/linux-block 2013-05-08 11:51:05 -07:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-05-01 14:08:52 -07:00
bus
cdrom block_device_operations->release() should return void 2013-05-07 02:16:21 -04:00
char aio: don't include aio.h in sched.h 2013-05-07 20:16:25 -07:00
clk ARM: late Exynos multiplatform changes 2013-05-07 11:28:42 -07:00
clocksource ARM: late Exynos multiplatform changes 2013-05-07 11:28:42 -07:00
connector
cpufreq Merge branch 'pm-cpufreq' 2013-04-29 00:08:46 +02:00
cpuidle cpuidle: add maintainer entry 2013-04-26 22:30:25 +02:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2013-05-02 14:53:12 -07:00
dca
devfreq
dio
dma ARM: arm-soc device tree changes, part 2 2013-05-07 11:06:17 -07:00
edac Merge branch 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac 2013-04-30 10:00:49 -07:00
eisa PCI changes for the v3.10 merge window: 2013-04-29 09:30:25 -07:00
extcon
firewire
firmware Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
gpio ARM: arm-soc platform updates for 3.10, part 2 2013-05-07 10:57:51 -07:00
gpu Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2013-05-02 19:40:34 -07:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2013-04-30 09:37:55 -07:00
hsi
hv Merge branch 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-04-30 08:41:21 -07:00
hwmon Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2013-05-04 13:44:38 -07:00
hwspinlock A single patch from Vincent extending OMAP's hwspinlock support to OMAP5. 2013-05-07 14:01:27 -07:00
i2c ARM: arm-soc device tree changes, part 2 2013-05-07 11:06:17 -07:00
ide block_device_operations->release() should return void 2013-05-07 02:16:21 -04:00
idle Merge branch 'pm-cpuidle' 2013-04-28 01:54:49 +02:00
iio
infiniband InfiniBand/RDMA changes for the 3.10 merge window: 2013-05-08 15:29:48 -07:00
input For 3.10 we have a few new MFD drivers for: 2013-05-05 17:36:20 -07:00
iommu IOMMU Updates for Linux v3.10 2013-05-06 14:59:13 -07:00
ipack
irqchip ARM: late Exynos multiplatform changes 2013-05-07 11:28:42 -07:00
isdn Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
leds
lguest Lots of virtio work which wasn't quite ready for last merge window. Plus 2013-05-02 14:14:04 -07:00
macintosh Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-05-02 10:16:16 -07:00
mailbox
md Merge branch 'for-3.10/drivers' of git://git.kernel.dk/linux-block 2013-05-08 11:51:05 -07:00
media Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2013-05-02 14:38:53 -07:00
memory
memstick block_device_operations->release() should return void 2013-05-07 02:16:21 -04:00
message Merge branch 'for-3.10/core' of git://git.kernel.dk/linux-block 2013-05-08 10:13:35 -07:00
mfd For 3.10 we have a few new MFD drivers for: 2013-05-05 17:36:20 -07:00
misc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
mmc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-07 15:14:53 -07:00
mtd Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-07 15:14:53 -07:00
net InfiniBand/RDMA changes for the 3.10 merge window: 2013-05-08 15:29:48 -07:00
nfc
ntb
nubus nubus: Kill nubus_proc_detach_device() 2013-05-04 14:47:26 -04:00
of ARM: arm-soc driver changes for 3.10 2013-05-04 12:31:18 -07:00
oprofile
parisc parisc: fix partly 16/64k PAGE_SIZE boot 2013-05-06 23:08:32 +02:00
parport
pci Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-05-02 10:16:16 -07:00
pcmcia
pinctrl ARM: arm-soc platform updates for 3.10, part 3 2013-05-07 11:02:18 -07:00
platform Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
pnp Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-05-02 10:16:16 -07:00
power For 3.10 we have a few new MFD drivers for: 2013-05-05 17:36:20 -07:00
pps Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
ps3
ptp
pwm pwm: lpc32xx: Don't change PWM_ENABLE bit in lpc32xx_pwm_config 2013-04-23 10:58:47 +02:00
rapidio
regulator Merge remote-tracking branch 'regulator/topic/wm8994' into v3.9-rc8 2013-04-28 02:13:50 +01:00
remoteproc This pull request contains: 2013-05-07 14:04:56 -07:00
reset
rpmsg A small pull request consisting of: 2013-05-07 14:02:00 -07:00
rtc drivers/rtc/rtc-rs5c372.c: add R2221T/L variant to the driver 2013-05-07 18:38:26 -07:00
s390 Merge branch 'for-3.10/core' of git://git.kernel.dk/linux-block 2013-05-08 10:13:35 -07:00
sbus
scsi Merge branch 'for-3.10/core' of git://git.kernel.dk/linux-block 2013-05-08 10:13:35 -07:00
sfi
sh
sn
spi ARM: arm-soc: late cleanups 2013-05-07 11:22:14 -07:00
ssb ssb: implement ssb spuravoid for chipid BCM43222 2013-04-26 08:42:22 -04:00
ssbi
staging Merge branch 'akpm' (incoming from Andrew) 2013-05-07 20:49:51 -07:00
target Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
tc
thermal thermal/exynos: remove unnecessary header inclusions 2013-04-19 13:51:23 +02:00
tty ARM: arm-soc: late cleanups 2013-05-07 11:22:14 -07:00
uio
usb aio: use cancellation list lazily 2013-05-07 18:38:29 -07:00
uwb uwb: rename random32() to prandom_u32() 2013-04-29 18:28:43 -07:00
vfio vfio updates for v3.10 2013-05-02 14:02:32 -07:00
vhost vhost: more fixes for 3.10 2013-05-07 10:13:52 -07:00
video ARM: arm-soc device tree changes, part 2 2013-05-07 11:06:17 -07:00
virt
virtio
vlynq
vme
w1 drivers/w1/slaves/w1_ds2760.c: fix the error handling in w1_ds2760_add_slave() 2013-04-30 17:04:08 -07:00
watchdog watchdog: Fix race condition in registration code 2013-05-09 08:13:41 +02:00
xen zcache/tmem: Better error checking on frontswap_register_ops return value. 2013-04-30 17:04:01 -07:00
zorro proc: Supply PDE attribute setting accessor functions 2013-05-01 17:29:18 -04:00
Kconfig ARM: arm-soc driver changes for 3.10 2013-05-04 12:31:18 -07:00
Makefile ARM: arm-soc driver changes for 3.10 2013-05-04 12:31:18 -07:00