From: Emil Tantilov Date: Fri, 26 Jul 2013 07:34:54 +0000 (+0000) Subject: ixgbe: zero out mailbox buffer on init X-Git-Tag: MMI-PSA29.97-13-9~13727^2~152^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b08e1ed9cfcf789421b7eccdd941f3f681c0a4ab;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ixgbe: zero out mailbox buffer on init This patch initializes the msgbuf array to 0 in order to avoid using random numbers from the memory as MAC address for the VF. Signed-off-by: Emil Tantilov Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c index 73c8e73bb6e7..276d7b135332 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c @@ -639,8 +639,8 @@ static int ixgbe_vf_reset_msg(struct ixgbe_adapter *adapter, u32 vf) { struct ixgbe_hw *hw = &adapter->hw; unsigned char *vf_mac = adapter->vfinfo[vf].vf_mac_addresses; - u32 reg, msgbuf[4]; - u32 reg_offset, vf_shift; + u32 reg, reg_offset, vf_shift; + u32 msgbuf[4] = {0, 0, 0, 0}; u8 *addr = (u8 *)(&msgbuf[1]); e_info(probe, "VF Reset msg received from vf %d\n", vf);