From nobody Mon Sep 19 02:15:16 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MW7Yc4nn3z4d4Fd; Mon, 19 Sep 2022 02:15:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MW7Yc49xkz3SgR; Mon, 19 Sep 2022 02:15:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663553716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BHn8BUVELSzUsU7+KKgQHFGe7f4/sg5pBY12slB/Neo=; b=oJBLX4DWc7q4umlrP5YaZBaUoLpKQ/zo4Yl1i/OXG27HTZxntWX0mRVWvFAxgZ/kvM9CAv N4jOS4YHEz0qGGWvt+ziXBW7Q9oqx1bBF4AgV7IEp6FQHy1WQ95dEB1Vkzzu8X/2hA4qFz M78LIXAFyJ9Q1GZYy5HwPr43BdBE3/aD4KmuYcA11YBmvls40uvVmEtoqSR3bQ4ClswbLY AtqgwOWEpSPyoanI+ob7DOaynAuU0gL144Hf22QuBKbvOFzhSf7jRr7D7bo79LZihsmNRS btju9PvdvqgNmT7d9lUj039dH/1Gkt3sQK0zx1cw+JowvySDvmzr39XHThdojg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MW7Yc378rzFDh; Mon, 19 Sep 2022 02:15:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 28J2FG2t045598; Mon, 19 Sep 2022 02:15:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28J2FGtM045597; Mon, 19 Sep 2022 02:15:16 GMT (envelope-from git) Date: Mon, 19 Sep 2022 02:15:16 GMT Message-Id: <202209190215.28J2FGtM045597@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: a3ab1102e39b - main - vfs: silence a bogus LOR in freevnode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3ab1102e39b3ae1e1b1edeed995154610c6b3fd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663553716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BHn8BUVELSzUsU7+KKgQHFGe7f4/sg5pBY12slB/Neo=; b=LHaKaGx6bTVSSU2YwZWjY0GyST39V5IQV4ZoI6ufrZPukYhkduZfxd8bSQPT2/QEji1qxe qGTjrIvSLl+RV0nYpiEmzMWMHHrUW8J4dVBVtwzAnTXfSidTPOPvrB/xR8vkFD4XtIFXsN Uo5UBjf0JH1CV56fb5EZJTKrFLEbi9M7GSJyRWsysVo+Ds5U8QKRvAnjSkaySBnol0OIzI nBCWqk3+V+wpFnTtPhglzzYSPPEtO/okJ5BB1MERe9RxntJxB1zmytRVBO0YjMxF2dSJB5 8+7xcyIV/J6taBNypgr2QrUpF3L0D+W3T76u+pFY/nt2KTtfV81dhDpr5oljQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663553716; a=rsa-sha256; cv=none; b=KCKtLKgrzqHCUPrBpq/eeTQOW7jRgVbS+03X503tt3B0zZigH2ERmru4N3QKF6NeRXbCcd K2Eaj+63xT1rLOEbr/GUZGA5dHN2Q5E5/cYfK7SO5r0CSNXTwuE51XX2R+yIq/ATpKvIU8 i+5ZEtoBbe+3pJSh/zcUr/t9Xr1wVKOa1rU/hybVdEY+CMx96PIjFNdQUBsteYso4OXTuA InHxEz6jrKpG19Vak0n/qnK6nQTDETjoOjl0vRoDJuEw7gHGKL3eyFhLFRyIFY+esNKAjF ufL9Z8WrDc8sKMFehsZ9relWVf80IDums1MxzVGS2UWVLhjO4WOJgwSKR45clg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=a3ab1102e39b3ae1e1b1edeed995154610c6b3fd commit a3ab1102e39b3ae1e1b1edeed995154610c6b3fd Author: Mateusz Guzik AuthorDate: 2022-09-12 23:40:22 +0000 Commit: Mateusz Guzik CommitDate: 2022-09-19 02:14:50 +0000 vfs: silence a bogus LOR in freevnode Reported by: imp --- sys/kern/vfs_subr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 2386e5a08169..a590579a25c0 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1918,7 +1918,12 @@ freevnode(struct vnode *vp) mac_vnode_destroy(vp); #endif if (vp->v_pollinfo != NULL) { - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + /* + * Use LK_NOWAIT to shut up witness about the lock. We may get + * here while having another vnode locked when trying to + * satisfy a lookup and needing to recycle. + */ + VOP_LOCK(vp, LK_EXCLUSIVE | LK_NOWAIT); destroy_vpollinfo(vp->v_pollinfo); VOP_UNLOCK(vp); vp->v_pollinfo = NULL;