* Fix kmalloc argument order in um/vdso/vma.c
@ 2011-10-24 22:15 Dave Jones
2011-10-24 22:23 ` Richard Weinberger
0 siblings, 1 reply; 3+ messages in thread
From: Dave Jones @ 2011-10-24 22:15 UTC (permalink / raw)
To: Richard Weinberger; +Cc: Linux Kernel
kmalloc size is 1st arg, not second.
Signed-off-by: Dave Jones <davej@redhat.com>
diff --git a/arch/um/sys-x86_64/vdso/vma.c b/arch/um/sys-x86_64/vdso/vma.c
index 9495c8d..91f4ec9 100644
--- a/arch/um/sys-x86_64/vdso/vma.c
+++ b/arch/um/sys-x86_64/vdso/vma.c
@@ -28,7 +28,7 @@ static int __init init_vdso(void)
um_vdso_addr = task_size - PAGE_SIZE;
- vdsop = kmalloc(GFP_KERNEL, sizeof(struct page *));
+ vdsop = kmalloc(sizeof(struct page *), GFP_KERNEL);
if (!vdsop)
goto oom;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: Fix kmalloc argument order in um/vdso/vma.c
2011-10-24 22:15 Fix kmalloc argument order in um/vdso/vma.c Dave Jones
@ 2011-10-24 22:23 ` Richard Weinberger
2011-10-24 22:51 ` Dave Jones
0 siblings, 1 reply; 3+ messages in thread
From: Richard Weinberger @ 2011-10-24 22:23 UTC (permalink / raw)
To: Dave Jones, Linux Kernel
[-- Attachment #1: Type: text/plain, Size: 273 bytes --]
Am 25.10.2011 00:15, schrieb Dave Jones:
> kmalloc size is 1st arg, not second.
>
> Signed-off-by: Dave Jones <davej@redhat.com>
Applied, Thanks!
I'm a bit shocked that this obviously wrong code builds and seems to work.
How have you found this?
//richard
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fix kmalloc argument order in um/vdso/vma.c
2011-10-24 22:23 ` Richard Weinberger
@ 2011-10-24 22:51 ` Dave Jones
0 siblings, 0 replies; 3+ messages in thread
From: Dave Jones @ 2011-10-24 22:51 UTC (permalink / raw)
To: Richard Weinberger; +Cc: Linux Kernel
On Tue, Oct 25, 2011 at 12:23:47AM +0200, Richard Weinberger wrote:
> Am 25.10.2011 00:15, schrieb Dave Jones:
> > kmalloc size is 1st arg, not second.
> >
> > Signed-off-by: Dave Jones <davej@redhat.com>
>
> Applied, Thanks!
>
> I'm a bit shocked that this obviously wrong code builds and seems to work.
Both args are the same types, so gcc didn't know any better.
> How have you found this?
grep -r kmalloc\(GFP *
Dave
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-24 22:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-24 22:15 Fix kmalloc argument order in um/vdso/vma.c Dave Jones
2011-10-24 22:23 ` Richard Weinberger
2011-10-24 22:51 ` Dave Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).