public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SCSI, pmcraid: Fix kmalloc() argument order in pmcraid_chr_ioctl()
@ 2011-10-24 22:38 Jesper Juhl
  2011-10-24 22:42 ` Joe Perches
  0 siblings, 1 reply; 14+ messages in thread
From: Jesper Juhl @ 2011-10-24 22:38 UTC (permalink / raw)
  To: linux-scsi; +Cc: linux-kernel, James E.J. Bottomley, Anil Ravindranath

The first argument to kmalloc() is the size, the second is
flags. pmcraid_chr_ioctl() gets this wrong and swaps the
arguments. This patch corrects the mistake.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 drivers/scsi/pmcraid.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

 compile tested only.

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index d079f9a..da19bdf 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -4103,7 +4103,7 @@ static long pmcraid_chr_ioctl(
 	struct pmcraid_ioctl_header *hdr = NULL;
 	int retval = -ENOTTY;
 
-	hdr = kmalloc(GFP_KERNEL, sizeof(struct pmcraid_ioctl_header));
+	hdr = kmalloc(sizeof(struct pmcraid_ioctl_header), GFP_KERNEL);
 
 	if (!hdr) {
 		pmcraid_err("faile to allocate memory for ioctl header\n");
-- 
1.7.7


-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-10-25  1:10 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-24 22:38 [PATCH] SCSI, pmcraid: Fix kmalloc() argument order in pmcraid_chr_ioctl() Jesper Juhl
2011-10-24 22:42 ` Joe Perches
2011-10-24 22:50   ` richard -rw- weinberger
2011-10-24 22:54     ` Dave Jones
2011-10-24 23:03       ` richard -rw- weinberger
2011-10-24 23:13         ` Jesper Juhl
2011-10-24 23:06       ` Jesper Juhl
2011-10-24 22:57     ` Jesper Juhl
2011-10-24 23:07       ` Joe Perches
2011-10-24 22:51   ` Jesper Juhl
2011-10-24 23:17     ` Joe Perches
2011-10-24 23:18   ` Dave Jones
2011-10-24 23:24     ` richard -rw- weinberger
2011-10-25  1:10       ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox