LOR with nfsclient "sillyrename"

Rick Macklem rmacklem at uoguelph.ca
Fri Jul 22 21:11:27 UTC 2011


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: oldsilly.patch
Type: text/x-patch
Size: 1811 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20110722/7d5a8ea4/oldsilly.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: newsilly.patch
Type: text/x-patch
Size: 1758 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20110722/7d5a8ea4/newsilly.bin


More information about the freebsd-net mailing list