Skip to contentSkip to conversation

netlink: reset skb->peeked when reuse orphan skb for next broadcast

PATCH Superseded Konstantin Khlebnikov 1 participant 2 messages Jul 10, 2015

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netlink: reset skb->peeked when reuse orphan skb for next broadcast

This patch clears skb->peeked set by previous recipient of broadcast.

Fixes add05ad4e9f5 ("unix/dgram: peek beyond 0-sized skbs")
---
 net/netlink/af_netlink.c |    1 +
 1 file changed, 1 insertion(+)
net/netlink/af_netlink.c +1 -0
index 921e0d8dfe3a..4e5c298c88b5 100644
@@ -1967,6 +1967,7 @@ static void do_one_broadcast(struct sock *sk,
 			 * delivered to a previous socket.
 			 */
 			skb_orphan(p->skb2);
+			skb->peeked = 0;
 		}
 	}
 	if (p->skb2 == NULL) {
#1 lore raw
Quoted 14 lines · Konstantin Khlebnikov

This patch clears skb->peeked set by previous recipient of broadcast.

Fixes add05ad4e9f5 ("unix/dgram: peek beyond 0-sized skbs")
---
  net/netlink/af_netlink.c |    1 +
  1 file changed, 1 insertion(+)
net/netlink/af_netlink.c +0 -0
index 921e0d8dfe3a..4e5c298c88b5 100644

net/netlink/af_netlink.c static void do_one_broadcast(struct sock *sk, · line 1973

Quoted 7 lines
net/netlink/af_netlink.c +1 -0
@@ -1967,6 +1967,7 @@ static void do_one_broadcast(struct sock *sk,
  			 * delivered to a previous socket.
  			 */
  			skb_orphan(p->skb2);
+			skb->peeked = 0;
  		}
  	}
  	if (p->skb2 == NULL) {

Oops, sorry. Please ignore it.

Signature · 1 line
Konstantin