mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 00:33:30 +00:00
evdev: return error rather than zero-length data on blocked read()
if blocked process has been woken up by evdev device destruction. MFC after: 2 weeks
This commit is contained in:
parent
80ddbddfd7
commit
006eb44926
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=359429
@ -217,6 +217,8 @@ evdev_read(struct cdev *dev, struct uio *uio, int ioflag)
|
||||
client->ec_blocked = true;
|
||||
ret = mtx_sleep(client, &client->ec_buffer_mtx,
|
||||
PCATCH, "evread", 0);
|
||||
if (ret == 0 && client->ec_revoked)
|
||||
ret = ENODEV;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user