[PATCH] watchdog: initialize device before misc_register

2020-07-15 Thread krzysztof.sob...@nokia.com
From: Krzysztof Sobota Date: Wed, 15 Jul 2020 13:13:42 +0200 Subject: [PATCH] watchdog: initialize device before misc_register When watchdog device is being registered, it calls misc_register that makes watchdog available for systemd to open. This is a data race scenario, because when device is

[PATCH v2] watchdog: initialize device before misc_register

2020-07-16 Thread krzysztof.sob...@nokia.com
watchdog: initialize device before misc_register When watchdog device is being registered, it calls misc_register that makes watchdog available for systemd to open. This is a data race scenario, because when device is open it may still have device struct not initialized - this in turn causes a cr

Re: [PATCH v3] watchdog: initialize device before misc_register

2020-07-16 Thread krzysztof.sob...@nokia.com
When watchdog device is being registered, it calls misc_register that makes watchdog available for systemd to open. This is a data race scenario, because when device is open it may still have device struct not initialized - this in turn causes a crash. This patch moves device initialization before