]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
[SCSI] megaraid_sas: mask off flags in ioctl path
authoradam radford <aradford@gmail.com>
Sat, 7 Jan 2012 01:02:34 +0000 (17:02 -0800)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 16 Jan 2012 07:27:46 +0000 (11:27 +0400)
Mask off flags in the ioctl path to prevent memory scribble with older MegaCLI
versions.

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/megaraid/megaraid_sas_base.c

index 29a994f9c4f1e6a9c0973ecd3cebe413f4937c7b..2bdc70754b14704b069dd9b3fea4d60991698cb5 100644 (file)
@@ -4773,6 +4773,8 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,
        memcpy(cmd->frame, ioc->frame.raw, 2 * MEGAMFI_FRAME_SIZE);
        cmd->frame->hdr.context = cmd->index;
        cmd->frame->hdr.pad_0 = 0;
+       cmd->frame->hdr.flags &= ~(MFI_FRAME_IEEE | MFI_FRAME_SGL64 |
+                                  MFI_FRAME_SENSE64);
 
        /*
         * The management interface between applications and the fw uses