Skip to content

Commit 37f0e51

Browse files
Cong WangAlexei Starovoitov
authored andcommitted
skmsg: Lock ingress_skb when purging
Currently we purge the ingress_skb queue only when psock refcnt goes down to 0, so locking the queue is not necessary, but in order to be called during ->close, we have to lock it here. Signed-off-by: Cong Wang <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Jakub Sitnicki <[email protected]> Acked-by: John Fastabend <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent e27bfef commit 37f0e51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/skmsg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ static void sk_psock_zap_ingress(struct sk_psock *psock)
634634
{
635635
struct sk_buff *skb;
636636

637-
while ((skb = __skb_dequeue(&psock->ingress_skb)) != NULL) {
637+
while ((skb = skb_dequeue(&psock->ingress_skb)) != NULL) {
638638
skb_bpf_redirect_clear(skb);
639639
kfree_skb(skb);
640640
}

0 commit comments

Comments
 (0)