diff options
| author | Guenter Roeck <linux@roeck-us.net> | 2026-10-27 09:02:56 -0700 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2026-11-16 13:26:11 -0800 |
| commit | 4da537f3b55220b31e5967466d54daaa38203660 (patch) | |
| tree | ccc8ba05475aec511ef988541aa1c09afdf98110 /rust/kernel/alloc/allocator | |
| parent | 32bcf30c28e0ce850b3ca58d4ec3041ee18e7931 (diff) | |
watchdog: core: Add missing locks
Add missing locks to watchdog_open(), watchdog_cdev_unregister(), and
watchdog_set_last_hw_keepalive(). Also protect old_wd_data with its own
lock to prevent its modification while in use, acquiring wd_data->lock
before releasing old_wd_data_lock in watchdog_open() to avoid a TOCTOU
race, and keeping misc_deregister() outside old_wd_data_lock to avoid
lock ordering inversion with misc_mtx.
Fixes: b4ffb1909843 ("watchdog: Separate and maintain variables based on variable lifetime")
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Link: https://patch.msgid.link/20261027160302.2519282-3-linux@roeck-us.net
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'rust/kernel/alloc/allocator')
0 files changed, 0 insertions, 0 deletions
