[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1110250103300.19795@swampdragon.chaosbits.net>
Date: Tue, 25 Oct 2011 01:06:12 +0200 (CEST)
From: Jesper Juhl <jj@...osbits.net>
To: Dave Jones <davej@...hat.com>
cc: richard -rw- weinberger <richard.weinberger@...il.com>,
Joe Perches <joe@...ches.com>, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org,
"James E.J. Bottomley" <JBottomley@...allels.com>
Subject: Re: [PATCH] SCSI, pmcraid: Fix kmalloc() argument order in
pmcraid_chr_ioctl()
On Mon, 24 Oct 2011, Dave Jones wrote:
> On Tue, Oct 25, 2011 at 12:50:08AM +0200, richard -rw- weinberger wrote:
>
> > BTW: What about a checkpatch.pl rule to detect such a misuse of kmalloc()?
> > We could grep for "k[mzc]alloc(GFP_".
>
> Make sure to ignore bio_kmalloc (which has reverse argument order to kmalloc, ugh)
>
Yeah, and there's also kmalloc_node() (and perhaps kmem_cache_alloc() &&
kmem_cache_alloc_node() although there the compiler will at least warn)
that might as well be checked for.
--
Jesper Juhl <jj@...osbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists