lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 21 Mar 2019 19:49:55 +0000
From:   Jon Maloy <jon.maloy@...csson.com>
To:     Arnd Bergmann <arnd@...db.de>
CC:     Nick Desaulniers <ndesaulniers@...gle.com>,
        Nathan Chancellor <natechancellor@...il.com>,
        Ying Xue <ying.xue@...driver.com>,
        "David S. Miller" <davem@...emloft.net>,
        "tipc-discussion@...ts.sourceforge.net" 
        <tipc-discussion@...ts.sourceforge.net>,
        Networking <netdev@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        "clang-built-linux@...glegroups.com" 
        <clang-built-linux@...glegroups.com>
Subject: RE: -Wsometimes-uninitialized Clang warning in net/tipc/node.c



> -----Original Message-----
> From: netdev-owner@...r.kernel.org <netdev-owner@...r.kernel.org>
> On Behalf Of Arnd Bergmann
> Sent: 21-Mar-19 19:23
> To: Jon Maloy <jon.maloy@...csson.com>
> Cc: Nick Desaulniers <ndesaulniers@...gle.com>; Nathan Chancellor
> <natechancellor@...il.com>; Ying Xue <ying.xue@...driver.com>; David S.
> Miller <davem@...emloft.net>; tipc-discussion@...ts.sourceforge.net;
> Networking <netdev@...r.kernel.org>; LKML <linux-
> kernel@...r.kernel.org>; clang-built-linux@...glegroups.com
> Subject: Re: -Wsometimes-uninitialized Clang warning in net/tipc/node.c
> 
> On Thu, Mar 21, 2019 at 4:25 PM Arnd Bergmann <arnd@...db.de> wrote:
> >
> > On Thu, Mar 21, 2019 at 3:57 PM Jon Maloy <jon.maloy@...csson.com>
> wrote:
> 
> > > >
> > > > diff --git a/net/tipc/node.c b/net/tipc/node.c index
> > > > 2dc4919ab23c..147786795e48 100644
> > > > --- a/net/tipc/node.c
> > > > +++ b/net/tipc/node.c
> > > > @@ -844,7 +844,8 @@ static void tipc_node_link_down(struct
> > > > tipc_node *n, int bearer_id, bool delete)
> > > >         tipc_node_write_unlock(n);
> > > >         if (delete)
> > > >                 tipc_mon_remove_peer(n->net, n->addr, old_bearer_id);
> > > > -       tipc_bearer_xmit(n->net, bearer_id, &xmitq, maddr);
> > > > +       if (skb_queue_empty(xmitq))
> > > > +               tipc_bearer_xmit(n->net, bearer_id, &xmitq,
> > > > + maddr);
> > > >         tipc_sk_rcv(n->net, &le->inputq);  }
> > > >
> > > > This duplicates the check inside of skb_queue_empty(), but I don't
> > > > know if the compiler can see through the logic behind the inlined
> function calls.
> > >
> > > Probably not, but this is not in any way time critical.
> >
> > I meant it's unclear whether compilers should be expected to see that
> > skb_queue_empty() is true after the call to __skb_queue_head_init()
> > initializes it.
> 
> I reproduced the warning now, and verified that my change eliminates the
> warning. I still think that is the more logical solution here.

Ok.  No problems with that.

///jon

> 
>       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ