From nobody Wed Apr 06 21:26:14 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 4B0F21AA0D4A; Wed, 6 Apr 2022 21:26:15 +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 4KYcyH1fNzz4qw9; Wed, 6 Apr 2022 21:26:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649280375; 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=UDpFra9ANmtaeoSKnVwa4ZwVd4YWfXJ8j2HdTT8L74A=; b=WC/1vn/lB9wjtRlEgKIc69v31LdIJOL1o09PIQc/lWMqBkTQM8471lbxhzaKR/gNLQHBuU 0CxhKe+WS5ATN/94IpuZL9/BgeC8aJ0FW1To8hSZVsevecxhUhyS93EXzQVbOtR+dQDAOc IGdaeKDPR/FQiM0lH+5Rr//oc5s7wLczFYOsQpiVC1JNS71ozfLGMGrNgcnFEXxKrcvNmE wAgMF4OeUJfLBUdqKY/siixyluEvjllNd6coikBuQuobMG63I7t7JJcOfOiiZ2JufpV97V 9D3tfEU263Bm/Q7Gqw4M2DldYi5q7TdCcnGVM1zb1FLSq7VBxTDE1LImMKqyqg== 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 186CB22D22; Wed, 6 Apr 2022 21:26:15 +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 236LQFGT019213; Wed, 6 Apr 2022 21:26:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 236LQE8a019212; Wed, 6 Apr 2022 21:26:14 GMT (envelope-from git) Date: Wed, 6 Apr 2022 21:26:14 GMT Message-Id: <202204062126.236LQE8a019212@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 4710aa248bcd - main - Avoid dereferencing a possibly null pointer. 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: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4710aa248bcdd77811540ad5695270254edfff55 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649280375; 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=UDpFra9ANmtaeoSKnVwa4ZwVd4YWfXJ8j2HdTT8L74A=; b=iTzNqYollIEGtRZo1wNk8JfHhepqRHqpFnThJiEme5S3kg87dQQvikBCB/qE93ihUcmaYD NnR/C2oc7mZQAuaVU2uOelcE0y6oKSydCG4hsoMxzYWitbUkBLsnnDg/E36thgYzSw/zUA PujKHuo/GSfeuP21x0CH9rZHdHk4AV5Zpzb4O6rrrRIF/05BMD4VBfuZp37N3suqn9KuEh zekCCfMrVUmB6/GzrCIt1bcfyJD6Gmjl82iGmlQse7vRx2qAcQfC4WQLIPg3o9gYG6LJSO 8EozxSxgpWcQGva5hONDdIfdQvIROpmHQZkD2EuZlZrJsdFFwufdYTy6cWCBSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649280375; a=rsa-sha256; cv=none; b=UCdjitcWa0lBDGB7EIO5zAe5JiuqdlSITcTJ1HGj4ScYC20JJa8uMcW7lEvW9IR02eAzmI cEOu++Tw2XoxabQhfHbNZ4ut/cQoZR2/fDxBEAfs7pzGq5sUOlnmsxtgu1Yps+ZhI5fMAD GP0SEy590jnmyXqj2GQ9tMfLAyMlS+RofuUkc9/LwXvpkJFbJA8PbBDKyQp9OVc4rTxizD oEEtdi1gXyg6A8Q/hFbZ+sDs+pQ1uOO5y7mhcLOocvJuiXMvdpIzb6DrP4ecvi+zl3oANF Hk0n9lT4xjKqylLZXQu7pBWSuGPtF9W2XHHHwsQWZxk2t/d5p4TmJpr/mARd1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=4710aa248bcdd77811540ad5695270254edfff55 commit 4710aa248bcdd77811540ad5695270254edfff55 Author: Kirk McKusick AuthorDate: 2022-04-06 21:25:11 +0000 Commit: Kirk McKusick CommitDate: 2022-04-06 21:25:55 +0000 Avoid dereferencing a possibly null pointer. Reported by: Coverity CID: 1475868 --- sys/geom/union/g_union.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/geom/union/g_union.c b/sys/geom/union/g_union.c index 5a4977a5fa57..23f7eaac25a9 100644 --- a/sys/geom/union/g_union.c +++ b/sys/geom/union/g_union.c @@ -1317,31 +1317,31 @@ g_union_destroy(struct gctl_req *req, struct g_geom *gp, bool force) if (force) { if (req != NULL) gctl_msg(req, "Device %s is still in use, " - "so is being forcibly removed.", pp->name); + "so is being forcibly removed.", gp->name); G_UNION_DEBUG(1, "Device %s is still in use, so " - "is being forcibly removed.", pp->name); + "is being forcibly removed.", gp->name); } else { if (req != NULL) gctl_msg(req, "Device %s is still open " - "(r=%d w=%d e=%d).", pp->name, pp->acr, + "(r=%d w=%d e=%d).", gp->name, pp->acr, pp->acw, pp->ace); G_UNION_DEBUG(1, "Device %s is still open " - "(r=%d w=%d e=%d).", pp->name, pp->acr, + "(r=%d w=%d e=%d).", gp->name, pp->acr, pp->acw, pp->ace); return (EBUSY); } } else { if (req != NULL) - gctl_msg(req, "Device %s removed.", pp->name); - G_UNION_DEBUG(1, "Device %s removed.", pp->name); + gctl_msg(req, "Device %s removed.", gp->name); + G_UNION_DEBUG(1, "Device %s removed.", gp->name); } /* Close consumers */ if ((error = g_access(sc->sc_lowercp, -1, 0, -1)) != 0) G_UNION_DEBUG(2, "Error %d: device %s could not reset access " - "to %s.", error, pp->name, sc->sc_lowercp->provider->name); + "to %s.", error, gp->name, sc->sc_lowercp->provider->name); if ((error = g_access(sc->sc_uppercp, -1, -1, -1)) != 0) G_UNION_DEBUG(2, "Error %d: device %s could not reset access " - "to %s.", error, pp->name, sc->sc_uppercp->provider->name); + "to %s.", error, gp->name, sc->sc_uppercp->provider->name); g_wither_geom(gp, ENXIO);