selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Paul Moore <paul@paul-moore.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>,
	Eric Paris <eparis@parisplace.org>,
	selinux@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [v2] selinux: avoid uninitialized variable warning
Date: Mon, 25 Mar 2019 15:24:20 +0100	[thread overview]
Message-ID: <CAK8P3a1DWqc5psQAgDM0zy5bRJH7-Bs1pWWtSoxQf_CZbrkjdw@mail.gmail.com> (raw)
In-Reply-To: <CAHC9VhSmxfpGpVkHvu=HmATm8+uRkdyo8bgrU8XJAK_h3K3dhA@mail.gmail.com>

On Mon, Mar 25, 2019 at 3:15 PM Paul Moore <paul@paul-moore.com> wrote:
> On Mon, Mar 25, 2019 at 8:40 AM Arnd Bergmann <arnd@arndb.de> wrote:
> > clang correctly points out a code path that would lead

> > -#if IS_ENABLED(CONFIG_IPV6)
> > -       } else {
> > +               rc = netlbl_conn_setattr(ep->base.sk, (void*)&addr4, &secattr);
> > +       } else if (IS_ENABLED(CONFIG_IPV6)) {
>
> I thought we had talked about using an else-if statement like the one
> below, is there any reason why you changed it to just the IS_ENABLED()
> check?  I liked the idea of explicitly checking the IP header version
> number before treating the packet as an IPv6 packet.
>
>   else if (IS_ENABLED(CONFIG_IPV6) && ip_hdr(skb)->version == 6)

Ah of course, sorry for missing that important part when I revisited
the patch. I've sent a v3 now.

      Arnd

      reply	other threads:[~2019-03-25 14:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-25 12:40 [PATCH] [v2] selinux: avoid uninitialized variable warning Arnd Bergmann
2019-03-25 14:14 ` Paul Moore
2019-03-25 14:24   ` Arnd Bergmann [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=CAK8P3a1DWqc5psQAgDM0zy5bRJH7-Bs1pWWtSoxQf_CZbrkjdw@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=eparis@parisplace.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@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).