mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-04 04:02:26 +00:00
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>
This commit is contained in:
parent
06d9b446c4
commit
b15a4cfe10
@ -634,7 +634,7 @@ static int kcm_write_msgs(struct kcm_sock *kcm)
|
|||||||
|
|
||||||
msize = 0;
|
msize = 0;
|
||||||
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
|
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,
|
iov_iter_bvec(&msg.msg_iter, ITER_SOURCE,
|
||||||
skb_shinfo(skb)->frags, skb_shinfo(skb)->nr_frags,
|
skb_shinfo(skb)->frags, skb_shinfo(skb)->nr_frags,
|
||||||
|
Loading…
Reference in New Issue
Block a user