]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, sockmap: Use truesize with sk_rmem_schedule()
authorJohn Fastabend <john.fastabend@gmail.com>
Mon, 16 Nov 2020 22:28:26 +0000 (14:28 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 17 Nov 2020 23:12:37 +0000 (00:12 +0100)
commit05b50f409653dbcd95cf5cc7cd41f387d466bcc7
tree8d41d820e002f1bb34fc94adecb835a01ef0883d
parent9d0e81c1f2a7e62ef0f1b8c422bc1d8d4bc733b0
bpf, sockmap: Use truesize with sk_rmem_schedule()

We use skb->size with sk_rmem_scheduled() which is not correct. Instead
use truesize to align with socket and tcp stack usage of sk_rmem_schedule.

Suggested-by: Daniel Borkman <daniel@iogearbox.net>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
Link: https://lore.kernel.org/bpf/160556570616.73229.17003722112077507863.stgit@john-XPS-13-9370
net/core/skmsg.c