Madhuparna Bhowmik
d01b633207
drivers: watchdog: rdc321x_wdt: Fix race condition bugs
...
[ Upstream commit 4b2e7f99cdd314263c9d172bc17193b8b6bba463 ]
In rdc321x_wdt_probe(), rdc321x_wdt_device.queue is initialized
after misc_register(), hence if ioctl is called before its
initialization which can call rdc321x_wdt_start() function,
it will see an uninitialized value of rdc321x_wdt_device.queue,
hence initialize it before misc_register().
Also, rdc321x_wdt_device.default_ticks is accessed in reset()
function called from write callback, thus initialize it before
misc_register().
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20200807112902.28764-1-madhuparnabhowmik10@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-11-05 11:43:20 +01:00
..
2019-07-08 20:35:11 +02:00
2019-07-08 20:35:11 +02:00
2019-05-30 11:26:32 -07:00
2019-05-21 10:50:45 +02:00
2019-08-12 13:05:37 +02:00
2019-05-05 21:02:14 +02:00
2019-05-21 11:28:40 +02:00
2019-12-13 08:43:30 +01:00
2019-05-06 17:46:41 +03:00
2019-05-05 21:02:12 +02:00
2018-03-24 10:19:40 +01:00
2019-07-24 20:21:39 +02:00
2019-05-30 11:29:21 -07:00
2018-03-24 10:19:40 +01:00
2019-05-06 17:46:41 +03:00
2019-07-08 16:08:32 +02:00
2019-07-08 15:13:02 +02:00
2019-07-08 20:35:10 +02:00
2019-11-05 16:58:12 +01:00
2019-05-30 11:26:32 -07:00
2019-07-08 15:13:04 +02:00
2019-05-05 21:10:33 +02:00
2019-05-24 17:36:45 +02:00
2019-11-05 16:58:11 +01:00
2019-07-08 15:13:04 +02:00
2019-05-05 21:02:16 +02:00
2020-06-24 17:50:32 +02:00
2019-05-05 21:04:57 +02:00
2019-07-08 20:35:11 +02:00
2019-09-17 08:59:01 +02:00
2019-07-15 08:49:11 +02:00
2019-05-30 11:26:32 -07:00
2019-07-08 20:35:11 +02:00
2019-05-05 21:02:19 +02:00
2019-07-08 20:35:11 +02:00
2020-08-21 13:05:28 +02:00
2019-07-08 15:13:06 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-07-08 19:39:44 +02:00
2019-07-08 16:10:10 +02:00
2019-07-08 15:13:06 +02:00
2019-07-08 20:35:11 +02:00
2019-05-06 17:46:41 +03:00
2019-07-08 20:46:48 +02:00
2019-06-19 17:09:55 +02:00
2019-09-17 08:59:02 +02:00
2020-01-04 19:18:13 +01:00
2020-06-17 16:40:27 +02:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:36:36 +02:00
2019-06-05 17:36:36 +02:00
2019-07-08 15:13:08 +02:00
2019-06-05 17:37:05 +02:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:32 -07:00
2020-04-08 09:08:46 +02:00
2020-04-08 09:08:46 +02:00
2020-04-08 09:08:46 +02:00
2019-05-16 08:31:32 -07:00
2019-08-12 13:05:39 +02:00
2020-02-01 09:34:43 +00:00
2019-06-05 17:36:38 +02:00
2019-06-19 17:09:55 +02:00
2019-07-08 15:13:08 +02:00
2019-06-19 17:09:55 +02:00
2019-05-06 17:46:41 +03:00
2019-05-30 11:26:32 -07:00
2019-09-17 08:59:12 +02:00
2019-05-05 21:02:22 +02:00
2019-07-08 15:13:09 +02:00
2019-07-08 20:35:10 +02:00
2019-07-08 15:13:09 +02:00
2019-07-08 15:13:10 +02:00
2018-08-02 15:57:12 +02:00
2019-11-05 16:58:12 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-05 21:02:24 +02:00
2019-05-05 21:02:24 +02:00
2019-07-08 15:13:10 +02:00
2019-06-19 17:09:55 +02:00
2019-05-05 21:02:25 +02:00
2019-05-06 17:46:41 +03:00
2019-07-08 20:35:11 +02:00
2019-07-08 15:13:10 +02:00
2019-07-08 15:13:11 +02:00
2019-07-08 15:13:11 +02:00
2019-05-30 11:26:32 -07:00
2019-07-08 20:35:11 +02:00
2019-07-08 20:35:11 +02:00
2017-09-04 21:19:03 +02:00
2019-07-08 15:13:12 +02:00
2019-07-08 20:35:11 +02:00
2019-07-08 20:35:11 +02:00
2020-02-01 09:34:43 +00:00
2019-07-08 20:35:11 +02:00
2019-07-08 20:35:11 +02:00
2019-07-08 20:35:11 +02:00
2019-08-12 13:05:37 +02:00
2019-07-08 15:13:12 +02:00
2019-07-08 15:13:12 +02:00
2019-05-21 10:50:45 +02:00
2019-11-05 16:58:11 +01:00
2019-05-30 11:26:32 -07:00
2019-09-16 22:10:05 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2020-02-14 16:34:12 -05:00
2019-07-08 15:13:14 +02:00
2019-05-30 11:26:32 -07:00
2020-11-05 11:43:20 +01:00
2019-07-08 19:39:44 +02:00
2019-07-08 20:35:11 +02:00
2019-08-12 13:05:38 +02:00
2020-02-01 09:34:43 +00:00
2019-06-19 17:09:55 +02:00
2019-05-05 21:10:34 +02:00
2019-05-05 21:02:27 +02:00
2019-07-08 15:13:14 +02:00
2019-07-08 20:35:11 +02:00
2019-07-08 20:35:12 +02:00
2019-08-12 13:05:37 +02:00
2019-05-30 11:26:32 -07:00
2019-07-08 20:35:11 +02:00
2019-07-08 20:35:11 +02:00
2019-05-30 11:26:32 -07:00
2019-05-06 17:46:41 +03:00
2019-06-05 17:36:38 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-07-08 20:35:11 +02:00
2019-08-12 13:05:37 +02:00
2019-05-30 11:26:32 -07:00
2019-05-21 11:28:40 +02:00
2019-07-08 20:35:09 +02:00
2019-07-08 20:35:11 +02:00
2020-04-23 10:36:15 +02:00
2019-07-08 15:13:15 +02:00
2020-10-29 09:57:55 +01:00
2020-01-26 10:01:02 +01:00
2019-07-08 15:13:16 +02:00
2020-02-14 16:34:18 -05:00
2019-07-08 15:13:17 +02:00
2019-05-05 21:02:29 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-05 21:02:30 +02:00
2019-07-08 15:13:17 +02:00
2019-05-05 21:02:31 +02:00
2019-05-05 21:02:32 +02:00
2019-07-08 15:13:17 +02:00
2019-05-30 11:26:35 -07:00
2019-06-19 17:09:55 +02:00
2019-05-05 21:02:32 +02:00
2019-05-30 11:29:22 -07:00
2019-05-30 11:29:22 -07:00
2019-07-08 20:35:11 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-07-08 20:35:11 +02:00
2020-02-11 04:35:37 -08:00
2019-07-08 20:35:11 +02:00
2020-10-29 09:57:55 +01:00
2019-05-30 11:26:32 -07:00
2017-11-02 11:10:55 +01:00
2019-07-08 20:35:11 +02:00
2020-03-21 08:11:48 +01:00
2019-05-30 11:26:32 -07:00
2019-08-20 19:43:23 -05:00
2019-08-12 13:05:38 +02:00
2019-07-08 20:35:11 +02:00
2019-08-12 13:05:37 +02:00
2019-07-08 15:13:18 +02:00
2018-03-24 10:19:40 +01:00
2019-07-08 15:13:18 +02:00
2019-09-17 08:59:09 +02:00
2019-05-30 11:29:22 -07:00