From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: jirislaby@gmail.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] NET: llc, zero sockaddr_llc struct
Date: Sun, 23 Aug 2009 23:20:28 -0300 [thread overview]
Message-ID: <20090824022028.GE6709@ghostprotocols.net> (raw)
In-Reply-To: <20090823.185617.36449822.davem@davemloft.net>
Em Sun, Aug 23, 2009 at 06:56:17PM -0700, David Miller escreveu:
> From: Jiri Slaby <jirislaby@gmail.com>
> Date: Sat, 22 Aug 2009 20:58:55 +0200
>
> > sllc_arphrd member of sockaddr_llc might not be set. Zero sllc
> > before copying it to the above layers.
> >
> > Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
> > Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
>
> I know it seems arbitrary, but could you please memset() on the
> structure instead of using an empty initializer so that it's
> consistent with how all other ->getname() implementations deal with
> this issue?
>
> It's easier to audit that way.
Or just set the uninitialized field to zero. But yeah, if what other
implementations are doing is to memset it to zero... maybe its more
clear from a quick glance :-)
- Arnaldo
next prev parent reply other threads:[~2009-08-24 2:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-22 18:58 [PATCH 1/1] NET: llc, zero sockaddr_llc struct Jiri Slaby
2009-08-24 1:56 ` David Miller
2009-08-24 2:20 ` Arnaldo Carvalho de Melo [this message]
2009-08-24 5:43 ` [PATCH v2 " Jiri Slaby
2009-08-24 5:55 ` David Miller
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=20090824022028.GE6709@ghostprotocols.net \
--to=acme@redhat.com \
--cc=davem@davemloft.net \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.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 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).