Re: [PATCH] RDMA/cma: Avoid using invalid state during rdma_bind_addr()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 17, 2018 at 11:33:51AM -0700, Roland Dreier wrote:
> > > Overall, I think the locks were trying to protect the state against
> > > CM callbacks, not a kernel caller invoking functions willy-nilly.
> > > It might be easier to focus the fix in the ucma and serialize calls
> > > into the cma from there.
> 
> We would still need to serialize between CM callbacks and UCMA calling into
> CMA, or at least audit that there are no races there.

If the design of this was that the caller is responsible for all
serialization then I think the try_lock scheme I outlined before is
the right approach. Putting the locking internal to the functions also
protects agains busted kernel ULPs.

I guess anthing that isn't already serializing is busted, and
hopefully that is a smaller list...

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux