ixgbe: zero out mailbox buffer on init
authorEmil Tantilov <emil.s.tantilov@intel.com>
Fri, 26 Jul 2013 07:34:54 +0000 (07:34 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 29 Aug 2013 10:04:18 +0000 (03:04 -0700)
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 <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c

index 73c8e73bb6e74754b36e2637c07ada9510e1fe4c..276d7b135332c1c1c0ec4415f0594f15ffd9f1d2 100644 (file)
@@ -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);