Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Oct 2018 03:47:42 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 232673] nfs client panic: nfs_advlock traps on doomed vnode via NFS_ISV4
Message-ID:  <bug-232673-227-JuL2PRt616@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-232673-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-232673-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D232673

Rick Macklem <rmacklem@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |Open
           Assignee|bugs@FreeBSD.org            |rmacklem@FreeBSD.org

--- Comment #1 from Rick Macklem <rmacklem@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 to=
o.
The NLM is a fundamentally flawed protocol that was never published as an R=
FC.
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.)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-232673-227-JuL2PRt616>