[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1110250110310.19795@swampdragon.chaosbits.net>
Date: Tue, 25 Oct 2011 01:13:58 +0200 (CEST)
From: Jesper Juhl <jj@...osbits.net>
To: richard -rw- weinberger <richard.weinberger@...il.com>
cc: Dave Jones <davej@...hat.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 Tue, 25 Oct 2011, richard -rw- weinberger wrote:
> On Tue, Oct 25, 2011 at 12:54 AM, Dave Jones <davej@...hat.com> 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)
> >
>
> Hmmm, maybe we should "fix" the argument order of bio_kmalloc().
> But as this function is exported we'd silently break some out-of-tree
> kernel modules....
>
Or we could fix it noisily by renaming the function kmalloc_bio() and
fixing the argument order. That will still break out-of-tree modules, but
at least it won't break them silently...
Or we could introduce kmalloc_bio() with fixed argument order, fix all
in-kernel users and mark bio_kmalloc() deprecated with a note that it'll
go away by 3.6 or thereabouts...
I'd be happy to prepare a patch series doing that if it's wanted...?
--
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.
Powered by blists - more mailing lists