]> Git Repo - linux.git/commitdiff
cxgb4: add forgotten u64 ivlan cast before shift
authorNikolay Kuratov <[email protected]>
Mon, 19 Aug 2024 07:54:08 +0000 (10:54 +0300)
committerJakub Kicinski <[email protected]>
Tue, 20 Aug 2024 22:43:58 +0000 (15:43 -0700)
It is done everywhere in cxgb4 code, e.g. in is_filter_exact_match()
There is no reason it should not be done here

Found by Linux Verification Center (linuxtesting.org) with SVACE

Signed-off-by: Nikolay Kuratov <[email protected]>
Cc: [email protected]
Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters")
Reviewed-by: Simon Horman <[email protected]>
Reviewed-by: Jacob Keller <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c

index 786ceae3448875666135a34549a062b6809fc503..dd9e68465e697835d57e422f1c129d942629e545 100644 (file)
@@ -1244,7 +1244,8 @@ static u64 hash_filter_ntuple(struct ch_filter_specification *fs,
         * in the Compressed Filter Tuple.
         */
        if (tp->vlan_shift >= 0 && fs->mask.ivlan)
-               ntuple |= (FT_VLAN_VLD_F | fs->val.ivlan) << tp->vlan_shift;
+               ntuple |= (u64)(FT_VLAN_VLD_F |
+                               fs->val.ivlan) << tp->vlan_shift;
 
        if (tp->port_shift >= 0 && fs->mask.iport)
                ntuple |= (u64)fs->val.iport << tp->port_shift;
This page took 0.052004 seconds and 4 git commands to generate.