Skip to content

Commit 4fdfaef

Browse files
drmiller-cnirleon
authored andcommitted
IB/hfi1: Fix possible panic during hotplug remove
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: 7724105 ("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>
1 parent 186b169 commit 4fdfaef

File tree

1 file changed

+1
-0
lines changed
  • drivers/infiniband/hw/hfi1

1 file changed

+1
-0
lines changed

drivers/infiniband/hw/hfi1/chip.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12307,6 +12307,7 @@ static void free_cntrs(struct hfi1_devdata *dd)
1230712307

1230812308
if (dd->synth_stats_timer.function)
1230912309
del_timer_sync(&dd->synth_stats_timer);
12310+
cancel_work_sync(&dd->update_cntr_work);
1231012311
ppd = (struct hfi1_pportdata *)(dd + 1);
1231112312
for (i = 0; i < dd->num_pports; i++, ppd++) {
1231212313
kfree(ppd->cntrs);

0 commit comments

Comments
 (0)