linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Kazior <michal.kazior@tieto.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2 3/5] ath10k: drain tx before restarting hw
Date: Fri, 23 May 2014 12:37:32 +0200	[thread overview]
Message-ID: <CA+BoTQntX+hAXfR-BOxeKn_qjF6A17RT--Ohg89JhkrUOarsxA@mail.gmail.com> (raw)
In-Reply-To: <877g5cvlay.fsf@kamboji.qca.qualcomm.com>

On 23 May 2014 12:31, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Michal Kazior <michal.kazior@tieto.com> writes:
>
>>> Sure, but I still think it's a bit ugly. The right way to fix this would
>>> be to add it to include/lockdep.h, instead of adding custom checks to a
>>> driver.
>>
>> Good point. I wonder if it's generic enough to justify.
>
> No idea. But no matter what it will take some time to get it accepted,
> so we need to solve this in a faster way so that I can apply this patch.
>
>>> But does this check even make sense? There's nothing preventing
>>> to another thread to take lock just after the WARN_ON(), right?
>>
>> There's nothing wrong with other thread holding it. Actually that's
>> the reason for this very check.
>>
>> The point is to prevent ath10k_drain_tx() being called while caller
>> (current thread) holds conf_mutex. If it were to hold conf_mutex then
>> cancel_work_sync() can deadlock as both workers it tries to stop try
>> to get a hold of the lock too.
>
> Ah, now I understand.
>
> What if we just drop the WARN_ON() from this patch just so that I can
> apply the patch and we add a proper code for checking the mutex in a
> followup patch? Are you ok with that?

I'm okay with this as long as we at least have a comment stating that
conf_mutex must not be held while calling the function to avoid
deadlocks.


Michał

  reply	other threads:[~2014-05-23 10:37 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-09 12:15 [PATCH 0/5] ath10k: recovery fixes 2014-05-09 Michal Kazior
2014-05-09 12:15 ` [PATCH 1/5] ath10k: clean up start() callback Michal Kazior
2014-05-14 19:07   ` Kalle Valo
2014-05-09 12:15 ` [PATCH 2/5] ath10k: perform hw restart lazily Michal Kazior
2014-05-09 12:15 ` [PATCH 3/5] ath10k: drain tx before restarting hw Michal Kazior
2014-05-09 12:15 ` [PATCH 4/5] ath10k: protect wep tx key setup Michal Kazior
2014-05-14 19:17   ` Kalle Valo
2014-05-14 19:50   ` Kalle Valo
2014-05-15  6:04     ` Michal Kazior
2014-05-09 12:15 ` [PATCH 5/5] ath10k: dont configure bssid for ap mode Michal Kazior
2014-05-14 18:58   ` Kalle Valo
2014-05-15  8:41 ` [PATCH v2 0/5] ath10k: recovery fixes 2014-05-09 Michal Kazior
2014-05-15  8:42   ` [PATCH v2 1/5] ath10k: clean up start() callback Michal Kazior
2014-05-15  8:42   ` [PATCH v2 2/5] ath10k: perform hw restart lazily Michal Kazior
2014-05-15  8:42   ` [PATCH v2 3/5] ath10k: drain tx before restarting hw Michal Kazior
2014-05-15 13:18     ` Kalle Valo
2014-05-16 14:37       ` Kalle Valo
2014-05-23  8:27     ` Kalle Valo
2014-05-23  8:38       ` Michal Kazior
2014-05-23  8:45         ` Kalle Valo
2014-05-23  9:06           ` Michal Kazior
2014-05-23 10:31             ` Kalle Valo
2014-05-23 10:37               ` Michal Kazior [this message]
2014-05-23 13:03             ` Johannes Berg
2014-05-26  5:48               ` Michal Kazior
2014-05-26  6:29                 ` Johannes Berg
2014-05-26  9:40     ` Kalle Valo
2014-05-26  9:43       ` Michal Kazior
2014-05-15  8:42   ` [PATCH v2 4/5] ath10k: protect wep tx key setup Michal Kazior
2014-05-15  8:42   ` [PATCH v2 5/5] ath10k: dont configure bssid for ap mode Michal Kazior
2014-05-27  9:29   ` [PATCH v2 0/5] ath10k: recovery fixes 2014-05-09 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=CA+BoTQntX+hAXfR-BOxeKn_qjF6A17RT--Ohg89JhkrUOarsxA@mail.gmail.com \
    --to=michal.kazior@tieto.com \
    --cc=ath10k@lists.infradead.org \
    --cc=kvalo@qca.qualcomm.com \
    --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;
as well as URLs for NNTP newsgroup(s).