From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Rajkumar Manoharan <rmanohar@qti.qualcomm.com>,
"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: [PATCH] ath10k: fix kernel panic while shutting down AP
Date: Wed, 8 Oct 2014 15:37:00 +0300 [thread overview]
Message-ID: <87fveyg2kz.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <CA+BoTQmOZiPQRWeiZ6QqZ5MhHbweMsdf94v1f5mkYpr2461j4A@mail.gmail.com> (Michal Kazior's message of "Wed, 8 Oct 2014 14:24:18 +0200")
Michal Kazior <michal.kazior@tieto.com> writes:
>>> Until now we have protected arvif->beacon_buf with data_lock. How do we
>>> know that this is safe to do without taking data_lock?
>>>
>> As said, spin_lock can not be used for dma_free_coherent.
>> arvif->beacon_buf is already protected by conf_mutex. At this state
>> in ath10k_halt path, no one can access beacon_buf. So mutex lock itself
>> is sufficient.
>
> beacon_buf is protected by conf_mutex implicitly. It wasn't the main
> intent. It is protected with data_lock spinlock.
>
> Do not trust the device - if there's a spurious SWBA event while
> ath10k_remove_interface() is running you could end up with invalid
> memory access.
>
> It might be acceptable to drop the spinlock for ath10k_halt() since
> the device is guaranteed to be stopped at that point (effectively
> reset) though.
>
> Anyway I'm hoping this bug can be fixed with the gfp flag.
Yeah, fixing this with the gfp flag would be much better solution.
--
Kalle Valo
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>,
linux-wireless <linux-wireless@vger.kernel.org>,
"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: [PATCH] ath10k: fix kernel panic while shutting down AP
Date: Wed, 8 Oct 2014 15:37:00 +0300 [thread overview]
Message-ID: <87fveyg2kz.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <CA+BoTQmOZiPQRWeiZ6QqZ5MhHbweMsdf94v1f5mkYpr2461j4A@mail.gmail.com> (Michal Kazior's message of "Wed, 8 Oct 2014 14:24:18 +0200")
Michal Kazior <michal.kazior@tieto.com> writes:
>>> Until now we have protected arvif->beacon_buf with data_lock. How do we
>>> know that this is safe to do without taking data_lock?
>>>
>> As said, spin_lock can not be used for dma_free_coherent.
>> arvif->beacon_buf is already protected by conf_mutex. At this state
>> in ath10k_halt path, no one can access beacon_buf. So mutex lock itself
>> is sufficient.
>
> beacon_buf is protected by conf_mutex implicitly. It wasn't the main
> intent. It is protected with data_lock spinlock.
>
> Do not trust the device - if there's a spurious SWBA event while
> ath10k_remove_interface() is running you could end up with invalid
> memory access.
>
> It might be acceptable to drop the spinlock for ath10k_halt() since
> the device is guaranteed to be stopped at that point (effectively
> reset) though.
>
> Anyway I'm hoping this bug can be fixed with the gfp flag.
Yeah, fixing this with the gfp flag would be much better solution.
--
Kalle Valo
next prev parent reply other threads:[~2014-10-08 12:37 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 9:16 [PATCH] ath10k: fix kernel panic while shutting down AP Rajkumar Manoharan
2014-10-08 9:16 ` Rajkumar Manoharan
2014-10-08 9:45 ` Michal Kazior
2014-10-08 9:45 ` Michal Kazior
2014-10-08 10:33 ` Rajkumar Manoharan
2014-10-08 10:33 ` Rajkumar Manoharan
2014-10-08 10:50 ` Michal Kazior
2014-10-08 10:50 ` Michal Kazior
2014-10-08 11:08 ` Rajkumar Manoharan
2014-10-08 11:08 ` Rajkumar Manoharan
2014-10-08 11:13 ` Rajkumar Manoharan
2014-10-08 11:13 ` Rajkumar Manoharan
2014-10-08 12:17 ` Michal Kazior
2014-10-08 12:17 ` Michal Kazior
2014-10-08 12:16 ` Michal Kazior
2014-10-08 12:16 ` Michal Kazior
2014-10-10 9:36 ` Rajkumar Manoharan
2014-10-10 9:36 ` Rajkumar Manoharan
2014-10-08 9:52 ` Kalle Valo
2014-10-08 9:52 ` Kalle Valo
2014-10-08 10:48 ` Rajkumar Manoharan
2014-10-08 10:48 ` Rajkumar Manoharan
2014-10-08 12:24 ` Michal Kazior
2014-10-08 12:24 ` Michal Kazior
2014-10-08 12:37 ` Kalle Valo [this message]
2014-10-08 12:37 ` Kalle Valo
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=87fveyg2kz.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath10k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=michal.kazior@tieto.com \
--cc=rmanohar@qti.qualcomm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.