* [PATCH] kzalloc with swapped params in l2tp_dfs_seq_open
@ 2010-10-31 17:26 Dr. David Alan Gilbert
2010-11-01 13:56 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Dr. David Alan Gilbert @ 2010-10-31 17:26 UTC (permalink / raw)
To: linux-kernel; +Cc: jchapman, netdev
Hi,
'sparse' spotted that the parameters to kzalloc in l2tp_dfs_seq_open
were swapped.
Tested on current git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
at 1792f17b7210280a3d7ff29da9614ba779cfcedb build, boots and I can see that directory,
but there again I could see /sys/kernel/debug/l2tp with it swapped; I don't have
any l2tp in use.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
--
diff --git a/net/l2tp/l2tp_debugfs.c b/net/l2tp/l2tp_debugfs.c
index 104ec3b..b8dbae8 100644
--- a/net/l2tp/l2tp_debugfs.c
+++ b/net/l2tp/l2tp_debugfs.c
@@ -249,7 +249,7 @@ static int l2tp_dfs_seq_open(struct inode *inode, struct file *file)
struct seq_file *seq;
int rc = -ENOMEM;
- pd = kzalloc(GFP_KERNEL, sizeof(*pd));
+ pd = kzalloc(sizeof(*pd), GFP_KERNEL);
if (pd == NULL)
goto out;
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux | Happy \
\ gro.gilbert @ treblig.org | | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kzalloc with swapped params in l2tp_dfs_seq_open
2010-10-31 17:26 [PATCH] kzalloc with swapped params in l2tp_dfs_seq_open Dr. David Alan Gilbert
@ 2010-11-01 13:56 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-11-01 13:56 UTC (permalink / raw)
To: linux; +Cc: linux-kernel, jchapman, netdev
From: "Dr. David Alan Gilbert" <linux@treblig.org>
Date: Sun, 31 Oct 2010 17:26:03 +0000
> Hi,
> 'sparse' spotted that the parameters to kzalloc in l2tp_dfs_seq_open
> were swapped.
>
> Tested on current git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
> at 1792f17b7210280a3d7ff29da9614ba779cfcedb build, boots and I can see that directory,
> but there again I could see /sys/kernel/debug/l2tp with it swapped; I don't have
> any l2tp in use.
>
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-01 13:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-31 17:26 [PATCH] kzalloc with swapped params in l2tp_dfs_seq_open Dr. David Alan Gilbert
2010-11-01 13:56 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.