From nobody Mon Apr 21 16:28:33 2025 X-Original-To: dev-commits-src-main@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 4Zh9m20tGbz5sjP1; Mon, 21 Apr 2025 16:28:34 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zh9m13Zjwz3fx9; Mon, 21 Apr 2025 16:28:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745252913; 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=n9hlbfik/efX08z02RCdI+3Z5XllBeJo0edBzN9WsGg=; b=wEyuxuxp9zOVF4CM/i8kRbyZ3kUb1iCRrTse0joGrQodMq39bYRmqb08T861aqQ83HV73I 9PTmyvRBZKN64TTqCzcOaw8nK4X7y0FZHqwMd1MbsAdAZfxMRbg9Z71DF3vD1Jatgbe3YK 2NuD+OhDV6H3U8+2ucQg5z/mBS5lZD3YOirTwJ+EVGu7ZaAtj6J5Fyn5yEQAqK1FoDjVq1 Qo00d5RDVSxJIXQNcSZAJHxbzXKpP9m2xSUHh3VmHVAG7O2+z/FAs/6xZZHDJSoe8lYg9n eZUNUwN4+Ghk39+glCz1mgigKMfsQscbXkFiA5ilocRy/xi2Lw/4aXFSocQbQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1745252913; a=rsa-sha256; cv=none; b=ZaW07C0P8xZI5E/xLdq3TzUjBk+3nVizZxAObGr7OL9IBAMoDVsXEv/69YW5cbOjP9wm3v 6iX1VOJRX2OZUHnwDdmhn9WoYireDlbR+AP8AujopUKN6vIuZTVfmp0OwqP9CMB38zLIP9 PtPESne+AWUV2Fg19Nw7goDBhQbMyIfpFyPpDuCPuKEaPegelfJ6LNG+TJub8XwLihCsIl 3og6oH1IAukbaORHfh/ZnR0Are8pe5k60yxLcJsCbHVkNzlZhKm3IEggFhI18pgQWoMByo 1hC94e+Fi+0LJVGUQ5tJ/X/A5DAetiGwi/Wj0Q7mxrb/eQx3Qmq0Kj2U1AIBpw== 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=1745252913; 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=n9hlbfik/efX08z02RCdI+3Z5XllBeJo0edBzN9WsGg=; b=AX3zyN/r04EB/otf4ceJLkKRlnL5CTTL82rkz+Dgx6N/imisbcAmTrOMS0WTYmrRD8bQlY xDlM5K8cakiDR9Jh5cF1x6phoswZEGpFner4v2p8NG+Zn8KQBcI7JVNhchKgALt8CkJASm l/LcoIvP9CQRzXfbRYNoamL9sdxZQKvhhojcZ4B9tPnJVY4RGr79/F7lrS8wf2IyHk0AGO Kyw/iYmLb8LDpDjGhN8l+F5ybAHsQlqE78wb3vkKxOwRl/51frs8nUyXaKFw4QAgQWNVt2 kAJJEwfvH/YMtR21jmbeIrdyKol/68WD/82b3lZej9gSll0207pV+AocVdvSxw== 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 4Zh9m136dpzxQ9; Mon, 21 Apr 2025 16:28:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 53LGSXCX089765; Mon, 21 Apr 2025 16:28:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53LGSXrV089762; Mon, 21 Apr 2025 16:28:33 GMT (envelope-from git) Date: Mon, 21 Apr 2025 16:28:33 GMT Message-Id: <202504211628.53LGSXrV089762@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 0fcd9be111dd - main - gpioaei: mark the AEI ithread as sleepable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0fcd9be111dd44d12a09805791a5597567602f8e Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0fcd9be111dd44d12a09805791a5597567602f8e commit 0fcd9be111dd44d12a09805791a5597567602f8e Author: Ahmad Khalifa AuthorDate: 2025-03-31 15:13:30 +0000 Commit: Ed Maste CommitDate: 2025-04-21 16:28:14 +0000 gpioaei: mark the AEI ithread as sleepable We call an ACPICA function in the interrupt handler which may attempt to lock a mutex. If this is done while another instance of the handler already holds the lock, it would cause a kernel panic since sleeping isn't allowed. Reviewed-by: Warner Losh Pull-request: https://github.com/freebsd/freebsd-src/pull/1667 Signed-off-by: Ahmad Khalifa --- sys/dev/gpio/gpioaei.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/gpio/gpioaei.c b/sys/dev/gpio/gpioaei.c index 6cbb5f1bb7ed..ecae8ccaf2fa 100644 --- a/sys/dev/gpio/gpioaei.c +++ b/sys/dev/gpio/gpioaei.c @@ -120,8 +120,9 @@ gpio_aei_attach(device_t dev) device_printf(dev, "Cannot allocate an IRQ\n"); return (ENOTSUP); } - err = bus_setup_intr(dev, sc->intr_res, INTR_TYPE_MISC | INTR_MPSAFE, - NULL, gpio_aei_intr, sc, &sc->intr_cookie); + err = bus_setup_intr(dev, sc->intr_res, INTR_TYPE_MISC | INTR_MPSAFE | + INTR_EXCL | INTR_SLEEPABLE, NULL, gpio_aei_intr, sc, + &sc->intr_cookie); if (err != 0) { device_printf(dev, "Cannot set up IRQ\n"); bus_release_resource(dev, SYS_RES_IRQ, sc->intr_rid,