On 4/13/21 9:03 AM, Wei Yongjun 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. Fixes: 8562d4fe34a3 ("mhi: pci_generic: Add health-check") Reported-by: Hulk Robot <hulkci@xxxxxxxxxx> Signed-off-by: Wei Yongjun <weiyongjun1@xxxxxxxxxx>
Reviewed-by: Hemant kumar <hemantk@xxxxxxxxxxxxxx> -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project