Re: [PATCH rdma-next] RDMA/odp: Fix use-after-free bug in releasing ucontext

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

 



On Fri, Sep 07, 2018 at 09:41:07PM +0300, Leon Romanovsky wrote:

> > The only way to avoid this splat is to either never call unregister
> > (woops!) or to only call unregister in cases where the mm has already
> > been mput (which is not possible to guarentee at this point)
> 
> We need to ensure that ib_umem_notifier_release is the only one
> who can access invalidated umem, it will remove the need of
> "down_read(&context->umem_rwsem);"

Hmm.. That lock is protecting both the context->odp_mrs_count global
and the context->umem_tree global, so it needs to be held here.

Maybe the lock could be split, but that seems worse than using nested.

Jason



[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