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
This commit is contained in:
Dag-Erling Smørgrav 2023-08-29 17:23:16 +00:00
parent 2e8edbc285
commit 28977cb9bc

View file

@ -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 {