From: Dan Carpenter <dan.carpenter@oracle.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: geoff@infradead.org, netdev@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, kernel-janitors@vger.kernel.org
Subject: Re: Inconsistent use of size argument in kzalloc and memcpy in 'drivers/net/ethernet/toshiba/ps3_gel
Date: Mon, 11 Apr 2016 10:26:08 +0000 [thread overview]
Message-ID: <20160411102608.GC4298@mwanda> (raw)
In-Reply-To: <570B75A4.5070904@wanadoo.fr>
On Mon, Apr 11, 2016 at 12:00:04PM +0200, Christophe JAILLET wrote:
> Hi,
>
> while looking at potential clean-up, I ended on the following code
> which looks spurious to me.
>
> We allocate 'be16_to_cpu(scan_info->size)' bytes, but then copy
> 'scan_info->size'.
> This is not consistent.
>
Good catch. be16_to_cpu(scan_info->size) is correct. It's surprising
that this bug wasn't caught in testing...
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: geoff@infradead.org, netdev@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, kernel-janitors@vger.kernel.org
Subject: Re: Inconsistent use of size argument in kzalloc and memcpy in 'drivers/net/ethernet/toshiba/ps3_gelic_wireless.c'
Date: Mon, 11 Apr 2016 13:26:08 +0300 [thread overview]
Message-ID: <20160411102608.GC4298@mwanda> (raw)
In-Reply-To: <570B75A4.5070904@wanadoo.fr>
On Mon, Apr 11, 2016 at 12:00:04PM +0200, Christophe JAILLET wrote:
> Hi,
>
> while looking at potential clean-up, I ended on the following code
> which looks spurious to me.
>
> We allocate 'be16_to_cpu(scan_info->size)' bytes, but then copy
> 'scan_info->size'.
> This is not consistent.
>
Good catch. be16_to_cpu(scan_info->size) is correct. It's surprising
that this bug wasn't caught in testing...
regards,
dan carpenter
next prev parent reply other threads:[~2016-04-11 10:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-11 10:00 Inconsistent use of size argument in kzalloc and memcpy in 'drivers/net/ethernet/toshiba/ps3_gelic_w Christophe JAILLET
2016-04-11 10:00 ` Inconsistent use of size argument in kzalloc and memcpy in 'drivers/net/ethernet/toshiba/ps3_gelic_wireless.c' Christophe JAILLET
2016-04-11 10:04 ` Inconsistent use of size argument in kzalloc and memcpy in 'drivers/net/ethernet/toshiba/ps3_gel walter harms
2016-04-11 10:04 ` Inconsistent use of size argument in kzalloc and memcpy in 'drivers/net/ethernet/toshiba/ps3_gelic_wireless.c' walter harms
2016-04-11 10:26 ` Dan Carpenter [this message]
2016-04-11 10:26 ` Dan Carpenter
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=20160411102608.GC4298@mwanda \
--to=dan.carpenter@oracle.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=geoff@infradead.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
/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 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.