Skip to content

Commit

Permalink
net/smc: cancel event worker during device removal
Browse files Browse the repository at this point in the history
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: syzbot+b297c6825752e7a07272@syzkaller.appspotmail.com
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Reviewed-by: Ursula Braun <ubraun@linux.ibm.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Karsten Graul authored and David S. Miller committed Mar 10, 2020
1 parent 6038048 commit ece0d7b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/smc/smc_ib.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ static void smc_ib_remove_dev(struct ib_device *ibdev, void *client_data)
smc_smcr_terminate_all(smcibdev);
smc_ib_cleanup_per_ibdev(smcibdev);
ib_unregister_event_handler(&smcibdev->event_handler);
cancel_work_sync(&smcibdev->port_event_work);
kfree(smcibdev);
}

Expand Down

0 comments on commit ece0d7b

Please sign in to comment.