summaryrefslogtreecommitdiff
path: root/net/unix
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2024-06-13 13:13:38 -0700
committerJakub Kicinski <kuba@kernel.org>2024-06-13 13:13:46 -0700
commit4c7d3d79c736186bb2585f2d0a8231e1fac839da (patch)
tree5abd973d57d360e24c9df2f17e942176ab2faaa5 /net/unix
parent3ec8d7572a69d142d49f52b28ce8d84e5fef9131 (diff)
parentd20f6b3d747c36889b7ce75ee369182af3decb6b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR. No conflicts, no adjacent changes. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/unix')
-rw-r--r--net/unix/af_unix.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 3821f8945b1e..e9c941e6a464 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -2625,18 +2625,18 @@ static struct sk_buff *manage_oob(struct sk_buff *skb, struct sock *sk,
if (skb == u->oob_skb) {
if (copied) {
skb = NULL;
- } else if (sock_flag(sk, SOCK_URGINLINE)) {
- if (!(flags & MSG_PEEK)) {
+ } else if (!(flags & MSG_PEEK)) {
+ if (sock_flag(sk, SOCK_URGINLINE)) {
WRITE_ONCE(u->oob_skb, NULL);
consume_skb(skb);
+ } else {
+ __skb_unlink(skb, &sk->sk_receive_queue);
+ WRITE_ONCE(u->oob_skb, NULL);
+ unlinked_skb = skb;
+ skb = skb_peek(&sk->sk_receive_queue);
}
- } else if (flags & MSG_PEEK) {
- skb = NULL;
- } else {
- __skb_unlink(skb, &sk->sk_receive_queue);
- WRITE_ONCE(u->oob_skb, NULL);
- unlinked_skb = skb;
- skb = skb_peek(&sk->sk_receive_queue);
+ } else if (!sock_flag(sk, SOCK_URGINLINE)) {
+ skb = skb_peek_next(skb, &sk->sk_receive_queue);
}
}