diff options
author | Mina Almasry <almasrymina@google.com> | 2024-01-02 21:59:58 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-01-04 03:37:22 +0100 |
commit | b15a4cfe100b9acd097d3ae7052448bd1cdc2a3b (patch) | |
tree | 36d2505bb5ec5b61542a845e56ef7fa780ab2ef6 /net/kcm | |
parent | vsock/virtio: use skb_frag_*() helpers (diff) | |
download | linux-b15a4cfe100b9acd097d3ae7052448bd1cdc2a3b.tar.xz linux-b15a4cfe100b9acd097d3ae7052448bd1cdc2a3b.zip |
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>
Diffstat (limited to 'net/kcm')
-rw-r--r-- | net/kcm/kcmsock.c | 2 |
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, |