Linux wireless drivers development
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: Markus Theil <markus.theil@tu-ilmenau.de>
Cc: lorenzo.bianconi@redhat.com, sgruszka@redhat.com,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mt76: disable softirqs while calling ieee80211_rx_napi
Date: Wed, 20 Nov 2019 12:36:55 +0100	[thread overview]
Message-ID: <84675864-e39a-2015-d9e4-9595d88fc32b@nbd.name> (raw)
In-Reply-To: <20191104134540.19199-1-markus.theil@tu-ilmenau.de>

On 2019-11-04 14:45, Markus Theil wrote:
> mac80211 assumes ieee80211_rx_napi to be called with disabled softirqs.
> 
> ieee80211_rx_napi in mac80211.c can be called from aggregation reordering work queue
> or from mt76_rx_poll_complete. mt76_rx_poll_complete does currently not disable softirq
> processing.
> 
> This patch fixes this by disabling softirqs before calling ieee80211_rx_napi.
> It should be no problem to disable them twice, if mt76_aggr_reorder_work calls ieee80211_rx_napi
> and has already called local_bh_disable, as local_bh_disable/local_bh_enable are reentrant.
> 
> I became aware of this issue by the following dmesg output:
>   NOHZ: local_softirq_pending 08
> 
> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
I believe this fix is incomplete. If we run with softirq enabled at this
point, it also implies that we've taken the RCU lock with softirq
enabled, which we really shouldn't do.
I believe this should be fixed by changing rcu_read_lock/unlock to the
_bh variant in mt76_dma_rx_poll(). I will send a patch for that.

Thanks,

- Felix

      reply	other threads:[~2019-11-20 11:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-04 13:45 [PATCH] mt76: disable softirqs while calling ieee80211_rx_napi Markus Theil
2019-11-20 11:36 ` Felix Fietkau [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=84675864-e39a-2015-d9e4-9595d88fc32b@nbd.name \
    --to=nbd@nbd.name \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=markus.theil@tu-ilmenau.de \
    --cc=sgruszka@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox