summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMina Almasry <almasrymina@google.com>2024-01-02 12:59:58 -0800
committerJakub Kicinski <kuba@kernel.org>2024-01-03 18:37:22 -0800
commitb15a4cfe100b9acd097d3ae7052448bd1cdc2a3b (patch)
tree36d2505bb5ec5b61542a845e56ef7fa780ab2ef6
parent06d9b446c4d445f0facb4b87cbbaeacd28c5a747 (diff)
net: kcm: fix direct access to bv_len
Minor fix for kcm: code wanting to access the fields inside an skb frag should use the skb_frag_*() helpers, instead of accessing the fields directly. Signed-off-by: Mina Almasry <almasrymina@google.com> Link: https://lore.kernel.org/r/20240102205959.794513-1-almasrymina@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--net/kcm/kcmsock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c
index 65d1f6755f98..1184d40167b8 100644
--- a/net/kcm/kcmsock.c
+++ b/net/kcm/kcmsock.c
@@ -634,7 +634,7 @@ retry:
msize = 0;
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
- msize += skb_shinfo(skb)->frags[i].bv_len;
+ msize += skb_frag_size(&skb_shinfo(skb)->frags[i]);
iov_iter_bvec(&msg.msg_iter, ITER_SOURCE,
skb_shinfo(skb)->frags, skb_shinfo(skb)->nr_frags,