Commit b15a4cfe authored by Mina Almasry's avatar Mina Almasry Committed by Jakub Kicinski

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: default avatarMina Almasry <almasrymina@google.com>
Link: https://lore.kernel.org/r/20240102205959.794513-1-almasrymina@google.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 06d9b446
......@@ -634,7 +634,7 @@ static int kcm_write_msgs(struct kcm_sock *kcm)
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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment