Patch "net: sfc: Correct key_len for efx_tc_ct_zone_ht_params" has been added to the 6.6-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: sfc: Correct key_len for efx_tc_ct_zone_ht_params

to the 6.6-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-sfc-correct-key_len-for-efx_tc_ct_zone_ht_params.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 2caf61fa7c544aebc024832eaf567f9ac100a1e9
Author: Liang Jie <liangjie@xxxxxxxxxxx>
Date:   Mon Dec 30 17:37:09 2024 +0800

    net: sfc: Correct key_len for efx_tc_ct_zone_ht_params
    
    [ Upstream commit a8620de72e5676993ec3a3b975f7c10908f5f60f ]
    
    In efx_tc_ct_zone_ht_params, the key_len was previously set to
    offsetof(struct efx_tc_ct_zone, linkage). This calculation is incorrect
    because it includes any padding between the zone field and the linkage
    field due to structure alignment, which can vary between systems.
    
    This patch updates key_len to use sizeof_field(struct efx_tc_ct_zone, zone)
    , ensuring that the hash table correctly uses the zone as the key. This fix
    prevents potential hash lookup errors and improves connection tracking
    reliability.
    
    Fixes: c3bb5c6acd4e ("sfc: functions to register for conntrack zone offload")
    Signed-off-by: Liang Jie <liangjie@xxxxxxxxxxx>
    Acked-by: Edward Cree <ecree.xilinx@xxxxxxxxx>
    Link: https://patch.msgid.link/20241230093709.3226854-1-buaajxlj@xxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/sfc/tc_conntrack.c b/drivers/net/ethernet/sfc/tc_conntrack.c
index 44bb57670340..109d2aa34ae3 100644
--- a/drivers/net/ethernet/sfc/tc_conntrack.c
+++ b/drivers/net/ethernet/sfc/tc_conntrack.c
@@ -16,7 +16,7 @@ static int efx_tc_flow_block(enum tc_setup_type type, void *type_data,
 			     void *cb_priv);
 
 static const struct rhashtable_params efx_tc_ct_zone_ht_params = {
-	.key_len	= offsetof(struct efx_tc_ct_zone, linkage),
+	.key_len	= sizeof_field(struct efx_tc_ct_zone, zone),
 	.key_offset	= 0,
 	.head_offset	= offsetof(struct efx_tc_ct_zone, linkage),
 };




[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