Skip to content

Commit bbbd4e5

Browse files
awilczyxbruce-richardson
authored andcommitted
net/ixgbe: fix PF link state request size
Currently, when requesting PF link state over VF mailbox, the buffer sized 3 dwords is allocated. However, the `ixgbevf_write_msg_read_ack` function is actually called with buffer size of 6 dwords. This leaves an admittedly remote possibility of buffer overrun. Fix by adjusting requested size to 3. Bugzille ID: 1801 Fixes: adbd710 ("net/ixgbe/base: fix link status for E610") Cc: [email protected] Signed-off-by: Andrzej Wilczynski <[email protected]> Signed-off-by: Anatoly Burakov <[email protected]> Acked-by: Bruce Richardson <[email protected]>
1 parent be01128 commit bbbd4e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/intel/ixgbe/base/ixgbe_vf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ int ixgbevf_get_pf_link_state(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
482482

483483
msgbuf[0] = IXGBE_VF_GET_PF_LINK_STATE;
484484

485-
err = ixgbevf_write_msg_read_ack(hw, msgbuf, msgbuf, 6);
485+
err = ixgbevf_write_msg_read_ack(hw, msgbuf, msgbuf, 3);
486486
if (err || (msgbuf[0] & IXGBE_VT_MSGTYPE_FAILURE)) {
487487
err = IXGBE_ERR_MBX;
488488
*speed = IXGBE_LINK_SPEED_UNKNOWN;

0 commit comments

Comments
 (0)