From owner-freebsd-bugs@freebsd.org Fri Oct 26 03:47:45 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1934110D4626 for ; Fri, 26 Oct 2018 03:47:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id AA53180D8C for ; Fri, 26 Oct 2018 03:47:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 6F60C10D4622; Fri, 26 Oct 2018 03:47:44 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D8A910D461F for ; Fri, 26 Oct 2018 03:47:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E318780D86 for ; Fri, 26 Oct 2018 03:47:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 2F02A1D683 for ; Fri, 26 Oct 2018 03:47:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w9Q3lhpA013126 for ; Fri, 26 Oct 2018 03:47:43 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w9Q3lhDm013125 for bugs@FreeBSD.org; Fri, 26 Oct 2018 03:47:43 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 232673] nfs client panic: nfs_advlock traps on doomed vnode via NFS_ISV4 Date: Fri, 26 Oct 2018 03:47:42 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: panic X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: rmacklem@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: rmacklem@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2018 03:47:45 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D232673 Rick Macklem changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Open Assignee|bugs@FreeBSD.org |rmacklem@FreeBSD.org --- Comment #1 from Rick Macklem --- 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.=