On Mon, May 13, 2013 at 11:32:18AM +0200, Arkadiusz Miskiewicz wrote:
> Hi.
> 
> This patch fixes a real problem on 3.8.x, .3.9.x. Possibly earlier stable 
> lines too but I only tested on 3.8 and 3.9.
> 
> Upstream patch applies fine to 3.8 and 3.9 stable lines.
> 
> Please add to the stable queue. Thanks.

I believe this is also applicable to the 3.5 kernel.  I'm queuing it
for this serie.

Cheers,
--
Luis


> 
> commit 60403f7a4d9368d187f79cba5e4672d01df37574 Author: Guenter
> Roeck <[email protected]> Date: Fri Apr 5 21:22:43 2013 -0700
> 
>     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 <[email protected]>
>     Signed-off-by: Guenter Roeck <[email protected]>
>     Tested-by: Arkadiusz Miskiewicz <[email protected]>
>     Signed-off-by: Wim Van Sebroeck <[email protected]>
> 
> -- 
> Arkadiusz Miƛkiewicz, arekm / maven.pl
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to