Linux wireless drivers development
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 3/4] mt76: fix race condition in station removal
Date: Fri, 16 Nov 2018 12:05:55 +0100	[thread overview]
Message-ID: <b696a8b8-d180-e618-008c-39d6cf4a23ac@nbd.name> (raw)
In-Reply-To: <20181113194123.93313-3-nbd@nbd.name>

On 2018-11-13 20:41, Felix Fietkau wrote:
> If there are still pending packets in the tx queue when removing a station,
> it could possibly lead to a call to further attempts to pull packets from
> the mac80211 tx queue after it has already been removed from the scheduling
> list.
> Prevent this from happening by calling synchronize_rcu after deleting the
> wcid pointer before further cleaning up the tx queues.
> To be extra careful, ensure that mtxq->list is always initialized properly.
> 
> Also drop the useless call to mt76x02_mac_wcid_setup, which only re-assigns
> the bss index of the wcid entry, but does not help with the cleanup in any
> way.
I misread the code and the call to mt76x02_mac_wcid_setup matters after
all. Will send a v2 of this series with further improvements.

- Felix

  reply	other threads:[~2018-11-16 11:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13 19:41 [PATCH 1/4] mt76: avoid queue/status spinlocks while passing tx status to mac80211 Felix Fietkau
2018-11-13 19:41 ` [PATCH 2/4] mt76: do not wake tx queues during flush Felix Fietkau
2018-11-13 19:41 ` [PATCH 3/4] mt76: fix race condition in station removal Felix Fietkau
2018-11-16 11:05   ` Felix Fietkau [this message]
2018-11-13 19:41 ` [PATCH 4/4] mt76: add mt76_sta_remove helper Felix Fietkau

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=b696a8b8-d180-e618-008c-39d6cf4a23ac@nbd.name \
    --to=nbd@nbd.name \
    --cc=linux-wireless@vger.kernel.org \
    /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