diff options
author | Kuniyuki Iwashima <kuniyu@amazon.co.jp> | 2022-03-17 12:08:09 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-08 14:24:14 +0200 |
commit | 21b6b8d43d87708c88ae34be67bb6cbba7bc60a0 (patch) | |
tree | 02c07dd39f617615949ff932941c225ac7fbdec3 /net/unix | |
parent | 260daa256d3056fd14d96c7a7519adc2ce4a7862 (diff) | |
download | linux-stable-21b6b8d43d87708c88ae34be67bb6cbba7bc60a0.tar.gz linux-stable-21b6b8d43d87708c88ae34be67bb6cbba7bc60a0.tar.bz2 linux-stable-21b6b8d43d87708c88ae34be67bb6cbba7bc60a0.zip |
af_unix: Support POLLPRI for OOB.
commit d9a232d435dcc966738b0f414a86f7edf4f4c8c4 upstream.
The commit 314001f0bf92 ("af_unix: Add OOB support") introduced OOB for
AF_UNIX, but it lacks some changes for POLLPRI. Let's add the missing
piece.
In the selftest, normal datagrams are sent followed by OOB data, so this
commit replaces `POLLIN | POLLPRI` with just `POLLPRI` in the first test
case.
Fixes: 314001f0bf92 ("af_unix: Add OOB support")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/unix')
-rw-r--r-- | net/unix/af_unix.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 826ac391a7a4..62f47821d783 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -3049,6 +3049,10 @@ static __poll_t unix_poll(struct file *file, struct socket *sock, poll_table *wa mask |= EPOLLIN | EPOLLRDNORM; if (sk_is_readable(sk)) mask |= EPOLLIN | EPOLLRDNORM; +#if IS_ENABLED(CONFIG_AF_UNIX_OOB) + if (READ_ONCE(unix_sk(sk)->oob_skb)) + mask |= EPOLLPRI; +#endif /* Connection-based need to check for termination and startup */ if ((sk->sk_type == SOCK_STREAM || sk->sk_type == SOCK_SEQPACKET) && |