aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy.c
diff options
context:
space:
mode:
authorCong Wang <cong.wang@bytedance.com>2022-09-12 10:35:53 -0700
committerPaolo Abeni <pabeni@redhat.com>2022-09-20 14:47:21 +0200
commitdb4192a754ebd52300a28abe1a50dd18eae0eb12 (patch)
treeb5c8303e4305c06b00f2bc92540299c5cbac07f1 /lib/test_fortify/write_overflow-strncpy.c
parent90fdd1c1e9c49bcb46cde589dbdee94a6977086a (diff)
tcp: read multiple skbs in tcp_read_skb()
Before we switched to ->read_skb(), ->read_sock() was passed with desc.count=1, which technically indicates we only read one skb per ->sk_data_ready() call. However, for TCP, this is not true. TCP at least has sk_rcvlowat which intentionally holds skb's in receive queue until this watermark is reached. This means when ->sk_data_ready() is invoked there could be multiple skb's in the queue, therefore we have to read multiple skbs in tcp_read_skb() instead of one. Fixes: 965b57b469a5 ("net: Introduce a new proto_ops ->read_skb()") Reported-by: Peilin Ye <peilin.ye@bytedance.com> Cc: John Fastabend <john.fastabend@gmail.com> Cc: Jakub Sitnicki <jakub@cloudflare.com> Cc: Eric Dumazet <edumazet@google.com> Signed-off-by: Cong Wang <cong.wang@bytedance.com> Link: https://lore.kernel.org/r/20220912173553.235838-1-xiyou.wangcong@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy.c')
0 files changed, 0 insertions, 0 deletions