Re: FIXME in hfi1/user_exp_rcv.c

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

 



On Thu, Oct 13, 2022 at 09:48:29AM -0400, Dennis Dalessandro wrote:
> On 10/13/22 9:21 AM, Jason Gunthorpe wrote:
> > On Thu, Oct 13, 2022 at 07:59:52AM -0500, Dean Luick wrote:
> >> Hi Jason,
> >>
> >> I am looking at the FIXME you left in hfi1/user_exp_rcv.c with git commit 3889551db212
> >>
> >> Link: https://lore.kernel.org/r/20191112202231.3856-7-jgg@xxxxxxxx
> >>
> >> Can you please explain in more detail what made you add the FIXME and what may be "racy"?
> > 
> > The comment seems self explanatory, the ordering is upposed to have
> > mmu_interval_read_begin() done before the page tables are read, not
> > after - since we already have a page list at this point it can't be
> > right.
> 
> Is the race you are worried about here when a user proc tries to free the memory
> before we get done handling the IOCTL to set up the recvs?

The mechanism of mmu notifiers allows coherently reading the page
table with a notification when the read becomes invalid. If you don't
order things properly then it just doesn't work as advertised.

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