git: 3dcce131c455 - stable/14 - e1000: fix possible variable overflow
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 25 Aug 2026 00:37:23 UTC
The branch stable/14 has been updated by kbowling:
URL: https://cgit.FreeBSD.org/src/commit/?id=3dcce131c455ea4afa6b0836ebc26b422f789b0a
commit 3dcce131c455ea4afa6b0836ebc26b422f789b0a
Author: Lukasz Czapnik <lukasz.czapnik@intel.com>
AuthorDate: 2026-05-20 12:52:40 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-08-25 00:34:17 +0000
e1000: fix possible variable overflow
DPDK commit message
net/e1000/base: fix possible variable overflow
Bits can be lost as temporary math is done on signed variables and the
result is assigned to an unsigned variable. Cast to u32 to force the
compiler to do operations on unsigned temporary variables.
Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Lukasz Czapnik <lukasz.czapnik@intel.com>
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Obtained from: DPDK (214cb0d7f1)
(cherry picked from commit b3bdffd7a428e43934772850966a3f80638c666f)
---
sys/dev/e1000/e1000_mac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dev/e1000/e1000_mac.c b/sys/dev/e1000/e1000_mac.c
index 13e25f9944fb..dcebd9cf1eb9 100644
--- a/sys/dev/e1000/e1000_mac.c
+++ b/sys/dev/e1000/e1000_mac.c
@@ -1915,7 +1915,7 @@ s32 e1000_blink_led_generic(struct e1000_hw *hw)
(mode == E1000_LEDCTL_MODE_LED_OFF))) {
ledctl_blink &=
~(E1000_LEDCTL_LED0_MODE_MASK << i);
- ledctl_blink |= (E1000_LEDCTL_LED0_BLINK |
+ ledctl_blink |= (u32)(E1000_LEDCTL_LED0_BLINK |
E1000_LEDCTL_MODE_LED_ON) << i;
}
}