[SCSI] be2iscsi: memset wrb for ring create
authorJayamohan Kallickal <jayamohan.kallickal@emulex.com>
Sat, 8 Oct 2011 00:31:11 +0000 (19:31 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Sun, 16 Oct 2011 16:03:40 +0000 (11:03 -0500)
   This patch fixes a situation when  wrb was not being memset to zero
before being used

Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/be2iscsi/be_cmds.c

index 67fd831e79c27a425d0bb0cc1ca8a05311a8d308..cdb15364bc6905316816c78c0aac9fde161839dc 100644 (file)
@@ -660,6 +660,7 @@ int beiscsi_cmd_mccq_create(struct beiscsi_hba *phba,
        spin_lock(&phba->ctrl.mbox_lock);
        ctrl = &phba->ctrl;
        wrb = wrb_from_mbox(&ctrl->mbox_mem);
+       memset(wrb, 0, sizeof(*wrb));
        req = embedded_payload(wrb);
        ctxt = &req->context;