[Bug 232673] nfs client panic: nfs_advlock traps on doomed vnode via NFS_ISV4
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Oct 26 03:47:45 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=232673
Rick Macklem <rmacklem at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|New |Open
Assignee|bugs at FreeBSD.org |rmacklem at FreeBSD.org
--- Comment #1 from Rick Macklem <rmacklem at FreeBSD.org> ---
I'll take a look and see if there is a simple patch for this particular
crash.
However I do know that, in general, that the NLM is not safe for
forced dismounts and I could never figure out a way to make it safe.
(Essentially, whenever the vnode is unlocked, a forced dismount can
cause a crash. However, there are areas in the code where the vnode
must be unlocked. I could reduce the likelyhood of a crash doing
something similar to what you suggest, where the code sets local
variables before unlocking the vnode and using those instead of
the vnode, but I couldn't do all cases.)
At the very least, it should check for a doomed vnode and return EBADF
when it does lock the vnode.
I've said this many times on the mailing lists, but I'll mention it here too.
The NLM is a fundamentally flawed protocol that was never published as an RFC.
I think avoiding use of it is the best way to go.
If locks for a file don't need to be visible to other clients, the "nolockd"
mount option should work. For the cases (not very common) where the locks
do need to be visible to other client(s), using NFSv4 is a better bet.
(And NFSv4.1 fixed a lot of things, so I suggest NFSv4.1 over NFSv4.0 if
possible.)
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list