[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAB_54W4EPDiEBHOFka99P5XF2O5gNxFhcWgjMgwaK58AcYr+Xw@mail.gmail.com>
Date: Mon, 17 Jan 2022 18:14:17 -0500
From: Alexander Aring <alex.aring@...il.com>
To: Miquel Raynal <miquel.raynal@...tlin.com>
Cc: Stefan Schmidt <stefan@...enfreihafen.org>,
linux-wpan - ML <linux-wpan@...r.kernel.org>,
"open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
"linux-wireless@...r.kernel.org Wireless"
<linux-wireless@...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>,
Michael Hennerich <michael.hennerich@...log.com>,
Jakub Kicinski <kuba@...nel.org>,
Varka Bhadram <varkabhadram@...il.com>,
Xue Liu <liuxuenetmail@...il.com>, Alan Ott <alan@...nal11.us>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v3 26/41] net: mac802154: Add a warning in the hot path
Hi,
On Mon, 17 Jan 2022 at 06:55, Miquel Raynal <miquel.raynal@...tlin.com> wrote:
>
> We should never start a transmission after the queue has been stopped.
>
> But because it might work we don't kill the function here but rather
> warn loudly the user that something is wrong.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@...tlin.com>
> ---
> net/mac802154/tx.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c
> index 18ee6fcfcd7f..de5ecda80472 100644
> --- a/net/mac802154/tx.c
> +++ b/net/mac802154/tx.c
> @@ -112,6 +112,8 @@ ieee802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
> static netdev_tx_t
> ieee802154_hot_tx(struct ieee802154_local *local, struct sk_buff *skb)
> {
> + WARN_ON(mac802154_queue_is_stopped(local));
> +
we should do a WARN_ON_ONCE() in this hot function.
- Alex
Powered by blists - more mailing lists