diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2023-08-29 17:23:16 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2023-09-07 20:28:30 +0000 |
commit | f41c23ee5b347c422f79630345af8a22bc9a5190 (patch) | |
tree | 6f31ff296bd1d4c65fe9db8d82881b6bfa66b93a | |
parent | bae932999e0fa9e9a08d84ca992332c57e5b42be (diff) | |
download | src-f41c23ee5b347c422f79630345af8a22bc9a5190.tar.gz src-f41c23ee5b347c422f79630345af8a22bc9a5190.zip |
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
(cherry picked from commit 28977cb9bc15a7f1fb7d28e14cd03f8dafd4e155)
Approved by: re (gjb)
-rw-r--r-- | sys/dev/acpi_support/acpi_wmi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/acpi_support/acpi_wmi.c b/sys/dev/acpi_support/acpi_wmi.c index 1df7cc60a940..6601db4317cb 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 { |