diff options
author | Anton Ivanov <anton.ivanov@cambridgegreys.com> | 2020-12-07 17:19:39 +0000 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2020-12-13 22:38:28 +0100 |
commit | 9b1c0c0e25dcccafd30e7d4c150c249cc65550eb (patch) | |
tree | 0e5ea2689996194fbe6588145dc72fc4033b3355 /net/mac80211/offchannel.c | |
parent | e3a01cbee9c5f2c6fc813dd6af007716e60257e7 (diff) | |
download | linux-9b1c0c0e25dcccafd30e7d4c150c249cc65550eb.tar.gz linux-9b1c0c0e25dcccafd30e7d4c150c249cc65550eb.tar.bz2 linux-9b1c0c0e25dcccafd30e7d4c150c249cc65550eb.zip |
um: tty: Fix handling of close in tty lines
Fix a logical error in tty reading. We get 0 and errno == EAGAIN
on the first attempt to read from a closed file descriptor.
Compared to that a true EAGAIN is EAGAIN and -1.
If we check errno for EAGAIN first, before checking the return
value we miss the fact that the descriptor is closed.
This bug is as old as the driver. It was not showing up with
the original POLL based IRQ controller, because it was
producing multiple events. Switching to EPOLL unmasked it.
Fixes: ff6a17989c08 ("Epoll based IRQ controller")
Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'net/mac80211/offchannel.c')
0 files changed, 0 insertions, 0 deletions