Thread (4 messages) flat view 4 messages, 3 authors, 2021-05-13

Re: [PATCH -next] watchdog: Fix possible use-after-free by calling del_timer_sync()

From: Vladimir Zapolskiy <vz@mleia.com>
Date: 2021-05-12 19:36:46
Also in: linux-watchdog, lkml

On 5/12/21 9:57 AM, Zou Wei wrote:
This driver's remove path calls del_timer(). However, that function
does not wait until the timer handler finishes. This means that the
timer handler may still be running after the driver's remove function
has finished, which would result in a use-after-free.

Fix by calling del_timer_sync(), which makes sure the timer handler
has finished, and unable to re-schedule itself.

Reported-by: Hulk Robot <redacted>
Signed-off-by: Zou Wei <redacted>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>

--
Best wishes,
Vladimir

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help