LOR with nfsclient "sillyrename"

Kostik Belousov kostikbel at gmail.com
Fri Jul 22 21:23:44 UTC 2011


On Fri, Jul 22, 2011 at 05:11:26PM -0400, Rick Macklem wrote:
> Jeremiah Lott wrote:
> > We're seeing nfsclient deadlocks with what looks like lock order
> > reversal after removing a "silly rename". It is fairly rare, but we've
> > seen it happen a few times. I included relevant back traces from an
> > occurrence. From what I can see, nfs_inactive() is called with the
> > vnode locked. If there is a silly-rename, it will call vrele() on its
> > parent directory, which can potentially try to lock the parent
> > directory. Since this is the opposite order of the lock acquisition in
> > lookup, it can deadlock. This happened in a FreeBSD7 build, but I
> > looked through freebsd head and didn't see any change that addressed
> > this. Anyone seen this before?
> > 
> > Jeremiah Lott
> > Avere Systems
> > 
> Please try the attached patch (which is also at):
>   http://people.freebsd.org/~rmacklem/oldsilly.patch
>   http://people.freebsd.org/~rmacklem/newsilly.patch
> (for the old and new clients in -current, respectively)
> 
> - I think oldsilly.patch should apply to the 7.n kernel
>   sources, although you might have to do the edit by hand?
> 
> The patch is based on what jhb@ posted, with changes as recommended
> by kib at .
> 
> Please let me know how testing goes with it, rick
> ps: Kostik, could you please review this, thanks.
> 
It looks fine to me, lets see how the testing goes.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20110722/a3056d0b/attachment.pgp


More information about the freebsd-net mailing list