FIXME in hfi1/user_exp_rcv.c
Hi Jason,
I am looking at the FIXME you left in hfi1/user_exp_rcv.c with git commit 3889551db212
Can you please explain in more detail what made you add the FIXME and what may be "racy"?
-Dean
External recipient
Jason Gunthorpe
maintainerQuoted 7 lines · Dean Luick
Hi Jason,
I am looking at the FIXME you left in
hfi1/user_exp_rcv.cwith git commit3889551db212Can 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.
Jason
Quoted 5 lines · Jason Gunthorpe
Quoted 4 lines · Dean Luick
Hi Jason,
I am looking at the FIXME you left in
hfi1/user_exp_rcv.cwith git commit3889551db212
Quoted 8 lines
Quoted 3 lines
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?
-Denny
Jason Gunthorpe
maintainerQuoted 10 lines · Dennis Dalessandro
Quoted 9 lines · Jason Gunthorpe
Quoted 7 lines · Dean Luick
Hi Jason,
I am looking at the FIXME you left in
hfi1/user_exp_rcv.cwith git commit3889551db212Can you please explain in more detail what made you add the FIXME and what may be "racy"?
Quoted 7 lines
Quoted 4 lines
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