From 28977cb9bc15a7f1fb7d28e14cd03f8dafd4e155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Tue, 29 Aug 2023 17:23:16 +0000 Subject: [PATCH] wmistat: don't restrict reading to the pid that opened the fd. PR: 273405 MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D41621 --- sys/dev/acpi_support/acpi_wmi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/acpi_support/acpi_wmi.c b/sys/dev/acpi_support/acpi_wmi.c index 1df7cc60a94..6601db4317c 100644 --- a/sys/dev/acpi_support/acpi_wmi.c +++ b/sys/dev/acpi_support/acpi_wmi.c @@ -976,8 +976,7 @@ acpi_wmi_wmistat_read(struct cdev *dev, struct uio *buf, int flag) sc = dev->si_drv1; ACPI_SERIAL_BEGIN(acpi_wmi); - if (sc->wmistat_open_pid != buf->uio_td->td_proc->p_pid || - sc->wmistat_bufptr == -1) { + if (sc->wmistat_bufptr == -1) { ret = EBADF; } else {