All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/4] megaraid_sas: mask off flags in ioctl path
@ 2012-01-07  1:02 adam radford
  0 siblings, 0 replies; only message in thread
From: adam radford @ 2012-01-07  1:02 UTC (permalink / raw)
  To: linux-scsi, Bo.Yang

[-- Attachment #1: Type: text/plain, Size: 838 bytes --]

James/linux-scsi,

The following patch for megaraid_sas masks off flags in the ioctl path
to prevent memory scribble with older MegaCLI versions.

Signed-off-by: Adam Radford <aradford@gmail.com>

diff -Naur scsi-misc-2.6/drivers/scsi/megaraid/megaraid_sas_base.c
scsi-misc-2.6.new/drivers/scsi/megaraid/megaraid_sas_base.c
--- scsi-misc-2.6/drivers/scsi/megaraid/megaraid_sas_base.c	2012-02-06
12:50:20.000000000 -0800
+++ scsi-misc-2.6.new/drivers/scsi/megaraid/megaraid_sas_base.c	2012-01-06
15:02:36.182434657 -0800
@@ -4773,6 +4773,8 @@
 	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

[-- Attachment #2: megaraid_sas.patch2 --]
[-- Type: application/octet-stream, Size: 642 bytes --]

diff -Naur scsi-misc-2.6/drivers/scsi/megaraid/megaraid_sas_base.c scsi-misc-2.6.new/drivers/scsi/megaraid/megaraid_sas_base.c
--- scsi-misc-2.6/drivers/scsi/megaraid/megaraid_sas_base.c	2012-02-06 12:50:20.000000000 -0800
+++ scsi-misc-2.6.new/drivers/scsi/megaraid/megaraid_sas_base.c	2012-01-06 15:02:36.182434657 -0800
@@ -4773,6 +4773,8 @@
 	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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-01-07  1:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-07  1:02 [PATCH 2/4] megaraid_sas: mask off flags in ioctl path adam radford

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.