Re: NFS vs NET_LOCK()

2018-03-29 Thread Visa Hankala
On Thu, Mar 29, 2018 at 11:57:42AM +0200, Martin Pieuchot wrote: > On 28/03/18(Wed) 16:09, Visa Hankala wrote: > > On Wed, Mar 28, 2018 at 11:59:46AM +0200, Martin Pieuchot wrote: > > > Index: uvm/uvm_vnode.c > > > === > > > RCS file:

Re: NFS vs NET_LOCK()

2018-03-29 Thread Martin Pieuchot
On 28/03/18(Wed) 16:09, Visa Hankala wrote: > On Wed, Mar 28, 2018 at 11:59:46AM +0200, Martin Pieuchot wrote: > > Index: uvm/uvm_vnode.c > > === > > RCS file: /cvs/src/sys/uvm/uvm_vnode.c,v > > retrieving revision 1.99 > > diff -u -p

Re: NFS vs NET_LOCK()

2018-03-28 Thread Visa Hankala
On Wed, Mar 28, 2018 at 11:59:46AM +0200, Martin Pieuchot wrote: > Index: uvm/uvm_vnode.c > === > RCS file: /cvs/src/sys/uvm/uvm_vnode.c,v > retrieving revision 1.99 > diff -u -p -r1.99 uvm_vnode.c > --- uvm/uvm_vnode.c 8 Mar 2018 22

Re: NFS vs NET_LOCK()

2018-03-28 Thread Martin Pieuchot
On 27/03/18(Tue) 15:47, Visa Hankala wrote: > On Tue, Mar 27, 2018 at 11:00:20AM +0200, Martin Pieuchot wrote: > > Diff below prevents a future lock ordering problem between NFSnode > > locks (similar to Inode locks) and the NET_LOCK(). > > > > It ensures the NET_LOCK() is always locked *after* an

Re: NFS vs NET_LOCK()

2018-03-27 Thread Visa Hankala
On Tue, Mar 27, 2018 at 11:00:20AM +0200, Martin Pieuchot wrote: > Diff below prevents a future lock ordering problem between NFSnode > locks (similar to Inode locks) and the NET_LOCK(). > > It ensures the NET_LOCK() is always locked *after* any NFSnode lock > by fixing the UVM fault case. So we

NFS vs NET_LOCK()

2018-03-27 Thread Martin Pieuchot
Diff below prevents a future lock ordering problem between NFSnode locks (similar to Inode locks) and the NET_LOCK(). It ensures the NET_LOCK() is always locked *after* any NFSnode lock by fixing the UVM fault case. So we have always have: VFS -> NFS -> NFSnode lock -> socket -> NET_LOCK(). O