From nobody Mon Oct 24 15:54: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 4Mx04Q67vKz4g301; Mon, 24 Oct 2022 15:54: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 4Mx04Q5d2Sz3X4P; Mon, 24 Oct 2022 15:54:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666626854; 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=gQ5YaTf1IxCwEL+kRlKVH20JYSJMdZd1nMK7jW/6hls=; b=CN2VNSHpb8uRYJ6KC+5rHvIN+CuxsvI5lIix6QXXhgUFHxlmG5hVStPRATNTg84+eWMJGY mfeZCgXus4MV47IHkbZhzzscNyH6kask64//UEzJ2pkbjKNvA7ToS+wlVURO6AC6dHEpfX Mz9sgf4CLI0C3sSmKOJpnAq5axlFZL4nB55gMe62139/he3+44XyFTfo4HP7+FMNh47xzW Jlo2lNiY0NVutsq61UI3ISHee6bujRjSe2+yoJfdpMSveLRHjEOLaiZSbfYnzQWwpiohhr fAO75X+qf/o/8i9BYRIyoBlxRqi1xUpbXumGVClCgWwuxWLHW7H+VMoliDRhTA== 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 4Mx04Q4X0VzHQK; Mon, 24 Oct 2022 15:54:14 +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 29OFsEhM013544; Mon, 24 Oct 2022 15:54:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29OFsEeA013543; Mon, 24 Oct 2022 15:54:14 GMT (envelope-from git) Date: Mon, 24 Oct 2022 15:54:14 GMT Message-Id: <202210241554.29OFsEeA013543@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: f177e00aefa4 - stable/13 - kern_intr: Check for NULL event in intr_destroy() 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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f177e00aefa49df572914fc061dd191e1b6e25f3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666626854; 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=gQ5YaTf1IxCwEL+kRlKVH20JYSJMdZd1nMK7jW/6hls=; b=cxEscfFEIbZsQsycWFpsQTUK95uSpdWfuFdxVxj3Z1ONz+KE8G5Kjh8qziqgrA4l5wy96B /947jB1NkgZWGHlC3AW5W8921iJoRJbpE/OrnuMeEoZBNLYY9zO4ICOJhUH+WLOaqPLOCS IuaF8soO1gFBmZIF/kMMKtFfG0QHX1ekGsysI/0k9yjuvdwCoF8KaOQc6DSaW3WVpD+ADr Lwjpcy94dLF/dtkacDYF/E4JY5EELU+OZPxImmcc46nWeLth8Q2u22Cu4U9nk0uipJ9twn i6K/3t8oUipZ+oPlEepQLsObSJKvVs587LcPS2ZPUFS6ZkGGWUAvJw8bfgD+9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666626854; a=rsa-sha256; cv=none; b=EZM3lFxI3iNDkA7OYkbN3o6JwiJKB15PMqZTVQNRiWzu5rIAUfL7R0TOXBtr8bC/6EJGSe P6myjhXy2FKJ347+FlfnfYK77h+1CxYlqwRVFghrM1Wdti5uNKM+fInt1PwynxvJ2xrniL pWqsnspLqZbqwi0UOBIwmxEDeuwzbyqnfy34z2haTKiyp0iZvRmXSmr2BkHZBFxG5x/Sz4 ng7KMzo7VD5MU1Irqiz8inhBpECE2NIF3VGvkG2S8ssaxvHew/teOSphEKz6sJ4aFUPRge prI3am/48r4H4arpuz0MjvnlYu7qwgyzHb7c74fYwZnyd8kGMlRFgUZXdoWdGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=f177e00aefa49df572914fc061dd191e1b6e25f3 commit f177e00aefa49df572914fc061dd191e1b6e25f3 Author: Mitchell Horne AuthorDate: 2022-10-15 18:43:53 +0000 Commit: Mitchell Horne CommitDate: 2022-10-24 15:53:11 +0000 kern_intr: Check for NULL event in intr_destroy() It likely won't happen, but is consistent with the other functions of this KPI. Reviewed by: imp, jhb MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D33479 (cherry picked from commit 39888ed7a3dca81c5d5c886e699dbcf58953137f) --- sys/kern/kern_intr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 449ae224bbe0..29e88ff42ae4 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -505,6 +505,9 @@ int intr_event_destroy(struct intr_event *ie) { + if (ie == NULL) + return (EINVAL); + mtx_lock(&event_lock); mtx_lock(&ie->ie_lock); if (!CK_SLIST_EMPTY(&ie->ie_handlers)) {