Skip to content

Commit ece0d7b

Browse files
karstengrdavem330
authored andcommitted
net/smc: cancel event worker during device removal
During IB device removal, cancel the event worker before the device structure is freed. Fixes: a4cf044 ("smc: introduce SMC as an IB-client") Reported-by: [email protected] Signed-off-by: Karsten Graul <[email protected]> Reviewed-by: Ursula Braun <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6038048 commit ece0d7b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/smc/smc_ib.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ static void smc_ib_remove_dev(struct ib_device *ibdev, void *client_data)
582582
smc_smcr_terminate_all(smcibdev);
583583
smc_ib_cleanup_per_ibdev(smcibdev);
584584
ib_unregister_event_handler(&smcibdev->event_handler);
585+
cancel_work_sync(&smcibdev->port_event_work);
585586
kfree(smcibdev);
586587
}
587588

0 commit comments

Comments
 (0)