From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753406Ab1JXWmb (ORCPT ); Mon, 24 Oct 2011 18:42:31 -0400 Received: from perches-mx.perches.com ([206.117.179.246]:59393 "EHLO labridge.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751643Ab1JXWma (ORCPT ); Mon, 24 Oct 2011 18:42:30 -0400 Message-ID: <1319496149.2094.3.camel@Joe-Laptop> Subject: Re: [PATCH] SCSI, pmcraid: Fix kmalloc() argument order in pmcraid_chr_ioctl() From: Joe Perches To: Jesper Juhl Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, "James E.J. Bottomley" , Anil Ravindranath Date: Mon, 24 Oct 2011 15:42:29 -0700 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.1- Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2011-10-25 at 00:38 +0200, Jesper Juhl wrote: > 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 > --- > 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 > > James seems to be uninterested in picking up obvious and trivially correct patches. >>From a year ago... https://lkml.org/lkml/2010/10/31/123 James?