]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
qed: Fix uninitialized data in aRFS infrastructure
authorMintz, Yuval <Yuval.Mintz@cavium.com>
Sun, 14 May 2017 09:21:23 +0000 (12:21 +0300)
committerChuck Anderson <chuck.anderson@oracle.com>
Tue, 19 Sep 2017 05:32:06 +0000 (22:32 -0700)
Orabug: 26783820

Current memset is using incorrect type of variable, causing the
upper-half of the strucutre to be left uninitialized and causing:

  ethernet/qlogic/qed/qed_init_fw_funcs.c: In function 'qed_set_rfs_mode_disable':
  ethernet/qlogic/qed/qed_init_fw_funcs.c:993:3: error: '*((void *)&ramline+4)' is used uninitialized in this function [-Werror=uninitialized]

Fixes: d51e4af5c209 ("qed: aRFS infrastructure support")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit aa4ad88cfcd4ee45f527fb982140576711e3b501 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c

index 67200c5498ab01d3911735f25e6ccea05aed200e..0a8fde6299919b3c1e0d7382ac90be30631644e3 100644 (file)
@@ -983,7 +983,7 @@ void qed_set_rfs_mode_disable(struct qed_hwfn *p_hwfn,
        memset(&camline, 0, sizeof(union gft_cam_line_union));
        qed_wr(p_hwfn, p_ptt, PRS_REG_GFT_CAM + CAM_LINE_SIZE * pf_id,
               camline.cam_line_mapped.camline);
-       memset(&ramline, 0, sizeof(union gft_cam_line_union));
+       memset(&ramline, 0, sizeof(ramline));
 
        for (i = 0; i < RAM_LINE_SIZE / REG_SIZE; i++) {
                u32 hw_addr = PRS_REG_GFT_PROFILE_MASK_RAM;