On Sat, Jan 12, 2019 at 05:06:02PM +0200, Leon Romanovsky wrote: > On Fri, Jan 11, 2019 at 07:31:24PM -0700, Jason Gunthorpe wrote: > > From: Jason Gunthorpe <jgg@xxxxxxxxxxxx> > > > > Work must hold a kref on the ib_device otherwise the dev pointer can > > become free before the work runs. > > How can it occur exactly? > > "dev" will be released after mlx5_ib will exist, mlx5_ib exist will > drain advise_mr queue before it. Such drain will ensure that no works > are running. Okay, that is fine for the get_device, it can be removed. Are we OK with the reg_state hunk? Jason