From: Kaladhar Musunuru Date: Fri, 7 May 2010 22:18:52 +0000 (-0700) Subject: [SCSI] libfcoe: Fix incorrect MAC address clearing X-Git-Tag: firefly_0821_release~9833^2~2084^2^2~7 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8b889e4f95545241fe90aa426ce9b7395d13ae06;p=firefly-linux-kernel-4.4.55.git [SCSI] libfcoe: Fix incorrect MAC address clearing Fix typo in memset. Incorrect length parameter to memset resulting non-zero MAC address in FPMA messages. Signed-off-by: Kaladhar Musunuru Acked-by: Joe Eykholt Signed-off-by: Robert Love Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index 948364a3342f..080e4eca65be 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c @@ -439,7 +439,7 @@ static int fcoe_ctlr_encaps(struct fcoe_ctlr *fip, struct fc_lport *lport, cap->encaps.fd_desc.fip_dlen = dlen / FIP_BPW; mac = (struct fip_mac_desc *)skb_put(skb, sizeof(*mac)); - memset(mac, 0, sizeof(mac)); + memset(mac, 0, sizeof(*mac)); mac->fd_desc.fip_dtype = FIP_DT_MAC; mac->fd_desc.fip_dlen = sizeof(*mac) / FIP_BPW; if (dtype != FIP_DT_FLOGI && dtype != FIP_DT_FDISC) {