From: Dave Jones <davej@redhat.com>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Mike Christie <michaelc@cs.wisc.edu>,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
Andy Whitcroft <apw@uk.ibm.com>
Subject: Re: [PATCH] buggered kmalloc()
Date: Fri, 20 Jul 2007 16:05:30 -0400 [thread overview]
Message-ID: <20070720200530.GA9978@redhat.com> (raw)
In-Reply-To: <20070720150340.GF21668@ftp.linux.org.uk>
On Fri, Jul 20, 2007 at 04:03:40PM +0100, Al Viro wrote:
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
> diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
> index aebcd5f..7829ab1 100644
> --- a/drivers/scsi/iscsi_tcp.c
> +++ b/drivers/scsi/iscsi_tcp.c
> @@ -1885,7 +1885,7 @@ static int iscsi_tcp_get_addr(struct iscsi_conn *conn, struct socket *sock,
> struct sockaddr_in *sin;
> int rc = 0, len;
>
> - addr = kmalloc(GFP_KERNEL, sizeof(*addr));
> + addr = kmalloc(sizeof(*addr), GFP_KERNEL);
> if (!addr)
> return -ENOMEM;
This seems like something that would be trivial to check for in checkpatch.
Dave
--
http://www.codemonkey.org.uk
next prev parent reply other threads:[~2007-07-20 20:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-20 15:03 [PATCH] buggered kmalloc() Al Viro
2007-07-20 20:05 ` Dave Jones [this message]
2007-07-20 21:00 ` Al Viro
2007-07-20 21:34 ` Arjan van de Ven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070720200530.GA9978@redhat.com \
--to=davej@redhat.com \
--cc=apw@uk.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=torvalds@linux-foundation.org \
--cc=viro@ftp.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox