[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK8P3a1DWqc5psQAgDM0zy5bRJH7-Bs1pWWtSoxQf_CZbrkjdw@mail.gmail.com>
Date: Mon, 25 Mar 2019 15:24:20 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Paul Moore <paul@...l-moore.com>
Cc: Stephen Smalley <sds@...ho.nsa.gov>,
Eric Paris <eparis@...isplace.org>, selinux@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [v2] selinux: avoid uninitialized variable warning
On Mon, Mar 25, 2019 at 3:15 PM Paul Moore <paul@...l-moore.com> wrote:
> On Mon, Mar 25, 2019 at 8:40 AM Arnd Bergmann <arnd@...db.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
Powered by blists - more mailing lists