From nobody Mon Oct 09 23:38:13 2023 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 4S4FpG2cCYz4wkRn; Mon, 9 Oct 2023 23:38:14 +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 4S4FpG0Zmbz3bYj; Mon, 9 Oct 2023 23:38:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696894694; 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=x8dlzDeF+mya7LwJEjSJc1q3VjoyWFJkTtyxviAan1o=; b=Lfg7VG/rcMTbpCimVVsbcT80kulSGqG2IuXtORDEnzApJHBibSJEE5fX7ApN79iRZcdN2T 2T6Cyc+L+BKxsE281oaGpYCTrFBPJ91LPqawbUnl+G4/kb2zzJzcaFdicqVlBjwE4nHTe3 1u4fJO6PS5A8j87zUHF1cub43vQ5SoP7nX51OPmR6T+KvjTtkJ8I1ktS6W2Zyr7MjLpAXx NTgHMUuUKALTnszw/LMvnhBuZjU6HIxbrsQq8kr0IgAEOJFNNzVcXcfNf/4NbfetqG8OdV MSDtTEi9ZvUluJs8N5b8yHocwJrT8OS/59W+x8YCU8nhRCorTuFMxMDEiy/s1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696894694; a=rsa-sha256; cv=none; b=b6DJoi3cSbRybovLShAr8ktbuedu1D7CrIGShym0ijpuZs2vgxXQrMflBFc7mmbXRGmXHB fSdCZKVl0qz8rL3Z7YuqnIjyb69Pm+8Q8aG6JbOLMJQnsG0xSrop3LOJ+n3EU8vOyHNFoO f2uuS6YcIvhNrePhfrCfB835eHNtOLOOtcGdqGLdlXY9ApVvHqCYEhI5B4z++uXaB25n4D mTsLxwgx+BYeeXnJ8tREnFhrDT6RjG/aIiKZLKTUJKMRCEHLaC3CzpVa4XZzQU1l/pKcVB J3SRrVcRq1YVyIr3m6cmbyBq2mqyy5ANHt5Sbrg29Qng//C8plXXwda4RfehGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696894694; 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=x8dlzDeF+mya7LwJEjSJc1q3VjoyWFJkTtyxviAan1o=; b=jT3pO5YRuS8I01UJZnDEU++n28XuqM3t395WBEdfqqGTOkr7UVh6pG0XrRV5eaEHdAJaCt 9KWQbbhNYoSmCaQqIifqdsBdghVdG10tE6jpT1VO3tmSaOsxfBqTjkw+mJk1XzQ4p23aFm XHSojH5GpFZU1QVjI34aE8b5rlP51F15KE2GltwzoEx+nXX8AWdYwAlOOXJVGIFdDhBbE/ YPWapmZBWoR2QWl3ziwR7o31+6Rh4D68B7pAAFcklYpwTd1knmaDvCG7v7IXen6qpeu5Qb DijjIuQdK7D1PdkDo3qSPLIt0as+1EQGmZniJPU6gZaDFsyZvCo229OOhUAsZQ== 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 4S4FpF6pDdz1Sw; Mon, 9 Oct 2023 23:38:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 399NcD0W006190; Mon, 9 Oct 2023 23:38:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399NcDAe006185; Mon, 9 Oct 2023 23:38:13 GMT (envelope-from git) Date: Mon, 9 Oct 2023 23:38:13 GMT Message-Id: <202310092338.399NcDAe006185@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 6e92fc930943 - main - vkbd: correct ref count on cloned cdevs 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e92fc930943a85f311e986a02e2b3dae9e37126 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6e92fc930943a85f311e986a02e2b3dae9e37126 commit 6e92fc930943a85f311e986a02e2b3dae9e37126 Author: Konstantin Belousov AuthorDate: 2023-10-02 22:25:52 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-09 23:37:43 +0000 vkbd: correct ref count on cloned cdevs Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42008 --- sys/dev/vkbd/vkbd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/vkbd/vkbd.c b/sys/dev/vkbd/vkbd.c index a8d4583f46c7..3dbf64063e33 100644 --- a/sys/dev/vkbd/vkbd.c +++ b/sys/dev/vkbd/vkbd.c @@ -191,6 +191,8 @@ vkbd_dev_clone(void *arg, struct ucred *cred, char *name, int namelen, *dev = make_dev_credf(MAKEDEV_REF, &vkbd_dev_cdevsw, unit, cred, UID_ROOT, GID_WHEEL, 0600, DEVICE_NAME "%d", unit); + else + dev_ref(*dev); } /* Open device */