Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Apr 2026 15:29:01 +0000
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 5c373870e9d6 - stable/15 - acpi: Use M_WAITOK in acpi_register_ioctl
Message-ID:  <69eb8c3d.361dc.7d2581e7@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=5c373870e9d69fb057ac8c551bb4299f8e277c23

commit 5c373870e9d69fb057ac8c551bb4299f8e277c23
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2025-12-26 15:36:48 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-04-24 15:26:38 +0000

    acpi: Use M_WAITOK in acpi_register_ioctl
    
    This function is only called from device attach routines which can
    sleep.
    
    Reviewed by:    imp
    Sponsored by:   Netflix
    Differential Revision:  https://reviews.freebsd.org/D54312
    
    (cherry picked from commit 425b41f81634fd5a8f7d038191560040d1d4d32c)
---
 sys/dev/acpica/acpi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 47c8ae1d1d6b..ce202bb60167 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -4111,8 +4111,7 @@ acpi_register_ioctl(u_long cmd, acpi_ioctl_fn fn, void *arg)
 {
     struct acpi_ioctl_hook *hp, *thp;
 
-    if ((hp = malloc(sizeof(*hp), M_ACPIDEV, M_NOWAIT)) == NULL)
-	return (ENOMEM);
+    hp = malloc(sizeof(*hp), M_ACPIDEV, M_WAITOK);
     hp->cmd = cmd;
     hp->fn = fn;
     hp->arg = arg;


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69eb8c3d.361dc.7d2581e7>