aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-add.c
diff options
context:
space:
mode:
authorWei Yongjun <[email protected]>2021-06-06 21:07:40 +0530
committerGreg Kroah-Hartman <[email protected]>2021-06-09 19:04:00 +0200
commit0b67808ade8893a1b3608ddd74fac7854786c919 (patch)
tree8574c5938c1ab180b595f0936c76c90ce7f91758 /lib/mpi/mpi-add.c
parentc7711c22c6ebc07a19a3dbdf87b05d9aa78f5390 (diff)
bus: mhi: pci_generic: Fix possible use-after-free in mhi_pci_remove()
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. Link: https://lore.kernel.org/r/[email protected] Fixes: 8562d4fe34a3 ("mhi: pci_generic: Add health-check") Cc: stable <[email protected]> Reported-by: Hulk Robot <[email protected]> Reviewed-by: Hemant kumar <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Reviewed-by: Loic Poulain <[email protected]> Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Manivannan Sadhasivam <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-add.c')
0 files changed, 0 insertions, 0 deletions