mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 07:38:10 +00:00
IB/hfi1: Fix possible panic during hotplug remove
commit4fdfaef71f
upstream. During hotplug remove it is possible that the update counters work might be pending, and may run after memory has been freed. Cancel the update counters work before freeing memory. Fixes:7724105686
("IB/hfi1: add driver files") Signed-off-by: Douglas Miller <doug.miller@cornelisnetworks.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com> Link: https://lore.kernel.org/r/169099756100.3927190.15284930454106475280.stgit@awfm-02.cornelisnetworks.com Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
af1f1ce2aa
commit
bfd727ad84
1 changed files with 1 additions and 0 deletions
|
@ -12178,6 +12178,7 @@ static void free_cntrs(struct hfi1_devdata *dd)
|
|||
|
||||
if (dd->synth_stats_timer.function)
|
||||
del_timer_sync(&dd->synth_stats_timer);
|
||||
cancel_work_sync(&dd->update_cntr_work);
|
||||
ppd = (struct hfi1_pportdata *)(dd + 1);
|
||||
for (i = 0; i < dd->num_pports; i++, ppd++) {
|
||||
kfree(ppd->cntrs);
|
||||
|
|
Loading…
Reference in a new issue