diff options
author | Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com> | 2020-08-07 16:59:02 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-10 10:23:54 +0100 |
commit | e92df84c4f742231fe718430da7b7dae38fc4289 (patch) | |
tree | f4e1fa27aedcf507e3e77f82115d73955d93d6de /sound | |
parent | ff4a198542591c9d9c349c3974c8a3dfbb3c5a93 (diff) | |
download | linux-stable-e92df84c4f742231fe718430da7b7dae38fc4289.tar.gz linux-stable-e92df84c4f742231fe718430da7b7dae38fc4289.tar.bz2 linux-stable-e92df84c4f742231fe718430da7b7dae38fc4289.zip |
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>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions