On Thu, Aug 27, 2020 at 5:15 PM Jason Gunthorpe <jgg@xxxxxxxxxx> wrote: > > On Thu, Aug 20, 2020 at 09:11:52AM +0530, Md Haris Iqbal wrote: > > > +static int rtrs_srv_add_one(struct ib_device *device) > > +{ > > + struct rtrs_srv_ctx *ctx; > > + int ret; > > + > > + if (ib_ctx.ib_dev_count) > > + goto out; > > Add's can run concurrently with remove and with other adds so this > unlocked variable is racing Hmm.. Didn't know that. Thanks, will update the patch and send. > > Jason -- Regards -Haris