Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Dec 2025 15:43:52 +0000
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 425b41f81634 - main - acpi: Use M_WAITOK in acpi_register_ioctl
Message-ID:  <694ead38.ce87.69ae88f2@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=425b41f81634fd5a8f7d038191560040d1d4d32c

commit 425b41f81634fd5a8f7d038191560040d1d4d32c
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2025-12-26 15:36:48 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2025-12-26 15:36:48 +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
---
 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 e49d3b4d1637..0aae1db9e96e 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -4205,8 +4205,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;


help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?694ead38.ce87.69ae88f2>