ATH10K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: [PATCH 2/2] ath10k: make core registering async
Date: Mon, 23 Jun 2014 13:51:18 +0200	[thread overview]
Message-ID: <1403524278.4418.19.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <CA+BoTQk=DU=-HzVo-XsQTpCt6CS7aXxQMy5hTyQ7qC56ebBLZQ@mail.gmail.com> (sfid-20140623_121907_420359_3A843E5E)

Hi,

>  [worker]
>  complete_all()
>  device_release_driver()
>  dev_lock()
>  {already held, yield}
>  [syscall]
>  free(internal structures)
>  dev_unlock()
>  return
>  [worker]
>  {woken up, but dev->driver == NULL so no callbacks}
>  dev_unlock()
>  return
> 
> The driver code section may not be reachable anymore upon worker
> returning from the device_release_driver() call, right? Also since
> ath10k uses an internal worker it also means the work_struct would be
> already freed by the syscall flow (i.e. worker would run after driver
> has supposedly been cleaned up..). Even if ath10k was to use
> request_firmware_nowait(), which allocates a temporary work_struct,
> the unreachable code section still remains a problem.
> 
> Or maybe this isn't really a problem and/or I'm missing something?

Yeah, hmm, this looks like a problem. I guess we didn't really consider
module unload in such detail ...

I guess this would crash upon return from device_release_driver()? I
guess if that's the last thing then maybe we'd actually get a tail-call
optimisation, but we don't want to rely on that of course!

Seems like to fix it we just need to get a module reference though? Can
a module put() itself though? Hmmm.

johannes


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  reply	other threads:[~2014-06-23 11:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-22 14:12 [PATCH 0/2] ath10k: async pci probing Michal Kazior
2014-05-22 14:12 ` [PATCH 1/2] ath10k: relocate core create/destroy functions Michal Kazior
2014-05-22 14:12 ` [PATCH 2/2] ath10k: make core registering async Michal Kazior
2014-05-22 14:41   ` Johannes Berg
2014-05-23  7:08     ` Michal Kazior
2014-06-23 10:19     ` Michal Kazior
2014-06-23 11:51       ` Johannes Berg [this message]
2014-06-23 12:17         ` Michal Kazior
2014-06-23 12:32           ` Johannes Berg
2014-06-23 12:59             ` Michal Kazior
2014-06-23 14:10               ` Johannes Berg
2014-05-22 16:40   ` Kalle Valo
2014-05-23  7:09     ` Michal Kazior
2014-05-22 16:42   ` Kalle Valo
2014-05-23  7:13     ` Michal Kazior
2014-05-23  7:16       ` Kalle Valo
2014-05-23 10:28 ` [PATCH 0/3] ath10k: async pci probing Michal Kazior
2014-05-23 10:28   ` [PATCH v2 1/3] ath10k: relocate core create/destroy functions Michal Kazior
2014-05-23 10:28   ` [PATCH v2 2/3] ath10k: remove unnecessary tasklet_kill() Michal Kazior
2014-05-23 10:28   ` [PATCH v2 3/3] ath10k: make core registering async Michal Kazior
2014-05-26  9:45   ` [PATCH 0/3] ath10k: async pci probing 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=1403524278.4418.19.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=ath10k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michal.kazior@tieto.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