Patch "net: kcm: fix direct access to bv_len" has been added to the 6.7-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: kcm: fix direct access to bv_len

to the 6.7-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-kcm-fix-direct-access-to-bv_len.patch
and it can be found in the queue-6.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f252439c286e8d07735300dcb9bf69fd24619090
Author: Mina Almasry <almasrymina@xxxxxxxxxx>
Date:   Tue Jan 2 12:59:58 2024 -0800

    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@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240102205959.794513-1-almasrymina@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

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 @@ 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,




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux