2018-10-05 08:37:57

by Stanislaw Gruszka

[permalink] [raw]
Subject: crash in ieee80211_wake_txqs

Hi

I have crash in ieee80211_wake_txqs:
https://imgur.com/a/VIrU9yK
when starting mt76x0u driver. Not sure if this is beacuse the driver
do not initalize sta->txq properly, but reverting the

commit 21a5d4c3a45ca608477a083096cfbce76e449a0c
Author: Manikanta Pubbisetty <[email protected]>
Date: Wed Jul 11 00:12:53 2018 +0530

mac80211: add stop/start logic for software TXQs

make crash gone.

gdb pointed at 'if (ac != txq->ac)' line in the code:

for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) {
struct ieee80211_txq *txq = sta->sta.txq[i];

txqi = to_txq_info(txq);

if (ac != txq->ac)
continue;

Looks txq is NULL and referencing txq->ac crashes.

Thanks
Stanislaw


2018-10-05 08:43:24

by Lorenzo Bianconi

[permalink] [raw]
Subject: Re: crash in ieee80211_wake_txqs

>
> Hi
>
> I have crash in ieee80211_wake_txqs:
> https://imgur.com/a/VIrU9yK
> when starting mt76x0u driver. Not sure if this is beacuse the driver
> do not initalize sta->txq properly, but reverting the
>
> commit 21a5d4c3a45ca608477a083096cfbce76e449a0c
> Author: Manikanta Pubbisetty <[email protected]>
> Date: Wed Jul 11 00:12:53 2018 +0530
>
> mac80211: add stop/start logic for software TXQs
>
> make crash gone.
>
> gdb pointed at 'if (ac != txq->ac)' line in the code:
>
> for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) {
> struct ieee80211_txq *txq = sta->sta.txq[i];
>
> txqi = to_txq_info(txq);
>
> if (ac != txq->ac)
> continue;
>
> Looks txq is NULL and referencing txq->ac crashes.
>
> Thanks
> Stanislaw

Hi Stanislaw,

I guess it is fixed here:
https://marc.info/?l=linux-kernel&m=153694084922438&w=2

Regrads,
Lorenzo

--
UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch;
unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp;
umount; make clean; sleep