> Ah! I *thought* I checked this, yes, using the system work queue is > why I added the put_device :) > > > It should be done to advise_mr_wq(). This will give chance to flush > > the wq when IB device is unregistered by the core. > > Good question - Moni?? > > Jason Thanks. Using schedule_work() is obviously a bug. The intention was to use the advise_mr_wq. I'll send a fix for that. However, After this will be fixed there is no need to get_device() since it is assured that no work items will be processed after mlx5_ib_stage_init_cleanup() finishes.