From owner-dev-commits-src-all@freebsd.org Tue Dec 29 14:36:17 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7AE754C111F; Tue, 29 Dec 2020 14:36:17 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4xmx36PGz4dWb; Tue, 29 Dec 2020 14:36:17 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 5DC015A06; Tue, 29 Dec 2020 14:36:17 +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 0BTEaHrA002146; Tue, 29 Dec 2020 14:36:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTEaHU8002145; Tue, 29 Dec 2020 14:36:17 GMT (envelope-from git) Date: Tue, 29 Dec 2020 14:36:17 GMT Message-Id: <202012291436.0BTEaHU8002145@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 123019739c90 - main - geom(4): make g_newprovider_event() return if G_P_WITHER is set MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 123019739c905a0d3b3c8b47ab62817f5938b684 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 14:36:17 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=123019739c905a0d3b3c8b47ab62817f5938b684 commit 123019739c905a0d3b3c8b47ab62817f5938b684 Author: Edward Tomasz Napierala AuthorDate: 2020-12-29 14:29:54 +0000 Commit: Edward Tomasz Napierala CommitDate: 2020-12-29 14:29:59 +0000 geom(4): make g_newprovider_event() return if G_P_WITHER is set This fixes a failed assertion in scenario where the provider disappears, disk_gone() gets called, and at the exact same time something else closes the device node triggering a retaste. Reviewed By: mav Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27330 --- sys/geom/geom_subr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c index c46eebf9e329..2f7ea7754f7b 100644 --- a/sys/geom/geom_subr.c +++ b/sys/geom/geom_subr.c @@ -575,8 +575,8 @@ g_new_provider_event(void *arg, int flag) return; pp = arg; G_VALID_PROVIDER(pp); - KASSERT(!(pp->flags & G_PF_WITHER), - ("g_new_provider_event but withered")); + if ((pp->flags & G_PF_WITHER) != 0) + return; LIST_FOREACH_SAFE(cp, &pp->consumers, consumers, next_cp) { if ((cp->flags & G_CF_ORPHAN) == 0 && cp->geom->attrchanged != NULL)