diff options
author | Mina Almasry <almasrymina@google.com> | 2024-01-02 12:59:58 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-02-05 20:14:25 +0000 |
commit | 45d201c4335bc7d144a5b5090922da9f2120a2e9 (patch) | |
tree | 56c8b4c84cdb94e3313f1a7aea58e596251d3902 /net/kcm | |
parent | 225b254911ef2e800fe25e4bcb9fecdb693ab66b (diff) | |
download | linux-stable-45d201c4335bc7d144a5b5090922da9f2120a2e9.tar.gz linux-stable-45d201c4335bc7d144a5b5090922da9f2120a2e9.tar.bz2 linux-stable-45d201c4335bc7d144a5b5090922da9f2120a2e9.zip |
net: kcm: fix direct access to bv_len
[ Upstream commit b15a4cfe100b9acd097d3ae7052448bd1cdc2a3b ]
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>
Signed-off-by: Sasha Levin <sashal@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 dd1d8ffd5f59..083376ea237e 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, |