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: <20220517152840.5a01037b@xps-13>
Date:   Tue, 17 May 2022 15:28:40 +0200
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     Alexander Aring <aahringo@...hat.com>
Cc:     Alexander Aring <alex.aring@...il.com>,
        Stefan Schmidt <stefan@...enfreihafen.org>,
        linux-wpan - ML <linux-wpan@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        "open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
        David Girault <david.girault@...vo.com>,
        Romuald Despres <romuald.despres@...vo.com>,
        Frederic Blain <frederic.blain@...vo.com>,
        Nicolas Schodet <nico@...fr.eu.org>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH wpan-next v2 05/11] net: mac802154: Bring the hability
 to hold the transmit queue


aahringo@...hat.com wrote on Tue, 17 May 2022 09:19:29 -0400:

> Hi,
> 
> On Tue, May 17, 2022 at 5:28 AM Miquel Raynal <miquel.raynal@...tlin.com> wrote:
> >
> > Hi Alex,
> >  
> > > > @@ -84,7 +118,7 @@ void ieee802154_xmit_complete(struct ieee802154_hw *hw, struct sk_buff *skb,
> > > >                                       hw->phy->sifs_period * NSEC_PER_USEC,
> > > >                                       HRTIMER_MODE_REL);
> > > >         } else {
> > > > -               ieee802154_wake_queue(hw);
> > > > +               ieee802154_release_queue(local);
> > > >         }
> > > >
> > > >         dev_consume_skb_any(skb);
> > > > @@ -98,7 +132,7 @@ void ieee802154_xmit_error(struct ieee802154_hw *hw, struct sk_buff *skb,
> > > >         struct ieee802154_local *local = hw_to_local(hw);
> > > >
> > > >         local->tx_result = reason;
> > > > -       ieee802154_wake_queue(hw);
> > > > +       ieee802154_release_queue(local);
> > > >         dev_kfree_skb_any(skb);
> > > >         atomic_dec(&hw->phy->ongoing_txs);  
> > >
> > > I am pretty sure that will end in a scheduling while atomic warning
> > > with hwsim. If you don't hit it you have the wrong config, you need to
> > > enable such warnings and have the right preemption model setting.  
> >
> > I was using the "desktop" kernel preemption model (voluntary), I've
> > switched to CONFIG_PREEMPT ("Preemptible kernel (Low-latency)"),
> > and enabled CONFIG_DEBUG_ATOMIC_SLEEP. You are right that we should use
> > a spinlock instead of a mutex here. However I don't think disabling
> > IRQs is necessary, so I'll switch to spin_(un)lock() calls.
> >  
> 
> In my opinion it's necessary for the ifs hrtimer. Normal
> spin_lock/unlock is not the right fit here.

You're right, I forgot about hrtimers.

Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ