diff options
| author | Lukasz Czapnik <lukasz.czapnik@intel.com> | 2026-05-20 12:52:40 +0000 |
|---|---|---|
| committer | Kevin Bowling <kbowling@FreeBSD.org> | 2026-08-11 18:47:58 +0000 |
| commit | b3bdffd7a428e43934772850966a3f80638c666f (patch) | |
| tree | 9ba1968f1e02c0c224cc92b362bad33382496d02 | |
| parent | 146ae81c6a5c72779bee81f1d5d5913491ae4eef (diff) | |
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)
MFC after: 2 weeks
| -rw-r--r-- | sys/dev/e1000/e1000_mac.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } } |
