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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <28ce014f1257f16e2cc5a1ebcedad0168f04b631.camel@redhat.com>
Date:   Fri, 29 Nov 2019 11:16:21 +0100
From:   Paolo Abeni <pabeni@...hat.com>
To:     David Miller <davem@...emloft.net>
Cc:     netdev@...r.kernel.org, pshelar@....org
Subject: Re: [PATCH net 1/2] openvswitch: drop unneeded BUG_ON() in
 ovs_flow_cmd_build_info()

On Thu, 2019-11-28 at 13:17 -0800, David Miller wrote:
> From: Paolo Abeni <pabeni@...hat.com>
> Date: Tue, 26 Nov 2019 13:10:29 +0100
> 
> > All callers already deal with errors correctly, dump a warn instead.
> > 
> > Fixes: ccb1352e76cf ("net: Add Open vSwitch kernel components.")
> > Signed-off-by: Paolo Abeni <pabeni@...hat.com>
> > ---
> >  net/openvswitch/datapath.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
> > index d8c364d637b1..e94f675794f1 100644
> > --- a/net/openvswitch/datapath.c
> > +++ b/net/openvswitch/datapath.c
> > @@ -882,7 +882,7 @@ static struct sk_buff *ovs_flow_cmd_build_info(const struct sw_flow *flow,
> >       retval = ovs_flow_cmd_fill_info(flow, dp_ifindex, skb,
> >                                       info->snd_portid, info->snd_seq, 0,
> >                                       cmd, ufid_flags);
> > -     BUG_ON(retval < 0);
> > +     WARN_ON_ONCE(retval < 0);
> >       return skb;
> >  }
> 
> I don't think this is right.  We should propagate the error by freeing the skb
> and returning a proper error pointer based upon retval.

Indeed you are right. Thank you for catching this.

Never cook patches when coffee is too low :/

Will send a v2

Thank you!

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ