Netdev List
 help / color / mirror / Atom feed
From: "François-Xavier Le Bail" <fx.lebail@yahoo.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: NETDEV <netdev@vger.kernel.org>, David Miller <davem@davemloft.net>
Subject: Re: [PATCH] net: rtnetlink: fix correct size given to memset
Date: Tue, 11 Feb 2014 08:01:25 -0800 (PST)	[thread overview]
Message-ID: <1392134485.29083.YahooMailNeo@web125506.mail.ne1.yahoo.com> (raw)
In-Reply-To: <1392132522.6615.85.camel@edumazet-glaptop2.roam.corp.google.com>

> From: Eric Dumazet <eric.dumazet@gmail.com>

> To: Francois-Xavier Le Bail <fx.lebail@yahoo.com>
>>  Find by cppcheck:
>>  [net/core/rtnetlink.c:1842]: (warning) Using size of pointer linkinfo 
> instead of size of its data.
>> 
>>  Signed-off-by: Francois-Xavier Le Bail <fx.lebail@yahoo.com>
>>  ---
>> 
>>  The diagnosis of cppcheck seems relevant.
>> 
>>   net/core/rtnetlink.c |    2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> 
> This is absolutely wrong.
> 
>     struct nlattr *linkinfo[IFLA_INFO_MAX+1];
> 
> sizeof(linkinfo) is totally appropriate 
> 
> sizeof(*linkinfo) is equal to sizeof(void *), and this is not what we
> need here.

Oops, sorry for the noise.

      parent reply	other threads:[~2014-02-11 16:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11 14:06 [PATCH] net: rtnetlink: fix correct size given to memset Francois-Xavier Le Bail
2014-02-11 15:28 ` Eric Dumazet
2014-02-11 15:54   ` David Laight
2014-02-11 16:01   ` François-Xavier Le Bail [this message]

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=1392134485.29083.YahooMailNeo@web125506.mail.ne1.yahoo.com \
    --to=fx.lebail@yahoo.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox