aboutsummaryrefslogtreecommitdiff
path: root/net/bluetooth/amp.c
diff options
context:
space:
mode:
authorGravatar Cong Wang <cong.wang@bytedance.com> 2022-08-17 12:54:42 -0700
committerGravatar Jakub Kicinski <kuba@kernel.org> 2022-08-18 11:04:55 -0700
commite9c6e79760265f019cde39d3f2c443dfbc1395b0 (patch)
tree3ca11d4513d0bd6b36983e8e9c389ba564ee0099 /net/bluetooth/amp.c
parentigb: Add lock to avoid data race (diff)
downloadlinux-e9c6e79760265f019cde39d3f2c443dfbc1395b0.tar.gz
linux-e9c6e79760265f019cde39d3f2c443dfbc1395b0.tar.bz2
linux-e9c6e79760265f019cde39d3f2c443dfbc1395b0.zip
tcp: fix sock skb accounting in tcp_read_skb()
Before commit 965b57b469a5 ("net: Introduce a new proto_ops ->read_skb()"), skb was not dequeued from receive queue hence when we close TCP socket skb can be just flushed synchronously. After this commit, we have to uncharge skb immediately after being dequeued, otherwise it is still charged in the original sock. And we still need to retain skb->sk, as eBPF programs may extract sock information from skb->sk. Therefore, we have to call skb_set_owner_sk_safe() here. Fixes: 965b57b469a5 ("net: Introduce a new proto_ops ->read_skb()") Reported-and-tested-by: syzbot+a0e6f8738b58f7654417@syzkaller.appspotmail.com Tested-by: Stanislav Fomichev <sdf@google.com> Cc: Eric Dumazet <edumazet@google.com> Cc: John Fastabend <john.fastabend@gmail.com> Cc: Jakub Sitnicki <jakub@cloudflare.com> Signed-off-by: Cong Wang <cong.wang@bytedance.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/bluetooth/amp.c')
0 files changed, 0 insertions, 0 deletions