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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210720110556.24cf7f8e@cakuba>
Date:   Tue, 20 Jul 2021 11:05:56 +0200
From:   Jakub Kicinski <kuba@...nel.org>
To:     Justin He <Justin.He@....com>
Cc:     Prabhakar Kushwaha <prabhakar.pkin@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Ariel Elior <aelior@...vell.com>,
        "GR-everest-linux-l2@...vell.com" <GR-everest-linux-l2@...vell.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        nd <nd@....com>, Shai Malin <malin1024@...il.com>,
        Shai Malin <smalin@...vell.com>,
        Prabhakar Kushwaha <pkushwaha@...vell.com>
Subject: Re: [PATCH] qed: fix possible unpaired spin_{un}lock_bh in
 _qed_mcp_cmd_and_union()

On Tue, 20 Jul 2021 02:02:26 +0000, Justin He wrote:
> > > For instance:
> > > _qed_mcp_cmd_and_union()
> > >   In while loop
> > >     spin_lock_bh()
> > >     qed_mcp_has_pending_cmd() (assume false), will break the loop  
> > 
> > I agree till here.
> >   
> > >   if (cnt >= max_retries) {
> > > ...
> > >     return -EAGAIN; <-- here returns -EAGAIN without invoking bh unlock
> > >   }
> > >  
> > 
> > Because of break, cnt has not been increased.
> >    - cnt is still less than max_retries.
> >   - if (cnt >= max_retries) will not be *true*, leading to spin_unlock_bh().
> > Hence pairing completed.  
> 
> Sorry, indeed. Let me check other possibilities.
> @David S. Miller Sorry for the inconvenience, could you please revert it
> in netdev tree?

Please submit a revert patch with the conclusions from the discussion
included in the commit message.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ