Re: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg.

From: Jason Gunthorpe
Date: Tue May 19 2020 - 20:10:49 EST


On Tue, May 19, 2020 at 04:30:52PM -0700, Divya Indi wrote:
> Hi Jason,
>
> I wanted to follow up to see if you got a chance to review the following reply?

Not yet, it still seems bad to be doing code like this.

If two threads are sharing memory they really need to use a
refcount/kref not rely on some sketchy thing with flags. It is very
hard to tell if the sketchy thing with flags is correct or not.

Jason