All of 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 14:32:47 +0200	[thread overview]
Message-ID: <1403526767.4418.24.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <CA+BoTQ=fpkOZXVgJt-OWdgSFX1_sO1g1E=J-7NnOb+e6a30FVA@mail.gmail.com> (sfid-20140623_141748_927938_88A91E9A)

On Mon, 2014-06-23 at 14:17 +0200, Michal Kazior wrote:

> > Seems like to fix it we just need to get a module reference though? Can
> > a module put() itself though? Hmmm.
> 
> It seems some drivers use module_put(THIS_MODULE) and
> __module_get(THIS_MODULE), e.g. tun/tap driver.

I don't see how this isn't racy in similar ways though?

> But does this bump up the module refcount in such a way that an
> in-progress rmmod will wait/block until the refcount reaches 0?

It should, yes, but you race once you do module_put(), no?

johannes


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

WARNING: multiple messages have this Message-ID (diff)
From: Johannes Berg <johannes@sipsolutions.net>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 2/2] ath10k: make core registering async
Date: Mon, 23 Jun 2014 14:32:47 +0200	[thread overview]
Message-ID: <1403526767.4418.24.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <CA+BoTQ=fpkOZXVgJt-OWdgSFX1_sO1g1E=J-7NnOb+e6a30FVA@mail.gmail.com> (sfid-20140623_141748_927938_88A91E9A)

On Mon, 2014-06-23 at 14:17 +0200, Michal Kazior wrote:

> > Seems like to fix it we just need to get a module reference though? Can
> > a module put() itself though? Hmmm.
> 
> It seems some drivers use module_put(THIS_MODULE) and
> __module_get(THIS_MODULE), e.g. tun/tap driver.

I don't see how this isn't racy in similar ways though?

> But does this bump up the module refcount in such a way that an
> in-progress rmmod will wait/block until the refcount reaches 0?

It should, yes, but you race once you do module_put(), no?

johannes


  reply	other threads:[~2014-06-23 12:33 UTC|newest]

Thread overview: 42+ 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 ` Michal Kazior
2014-05-22 14:12 ` [PATCH 1/2] ath10k: relocate core create/destroy functions Michal Kazior
2014-05-22 14:12   ` Michal Kazior
2014-05-22 14:12 ` [PATCH 2/2] ath10k: make core registering async Michal Kazior
2014-05-22 14:12   ` Michal Kazior
2014-05-22 14:41   ` Johannes Berg
2014-05-22 14:41     ` Johannes Berg
2014-05-23  7:08     ` Michal Kazior
2014-05-23  7:08       ` Michal Kazior
2014-06-23 10:19     ` Michal Kazior
2014-06-23 10:19       ` Michal Kazior
2014-06-23 11:51       ` Johannes Berg
2014-06-23 11:51         ` Johannes Berg
2014-06-23 12:17         ` Michal Kazior
2014-06-23 12:17           ` Michal Kazior
2014-06-23 12:32           ` Johannes Berg [this message]
2014-06-23 12:32             ` Johannes Berg
2014-06-23 12:59             ` Michal Kazior
2014-06-23 12:59               ` Michal Kazior
2014-06-23 14:10               ` Johannes Berg
2014-06-23 14:10                 ` Johannes Berg
2014-05-22 16:40   ` Kalle Valo
2014-05-22 16:40     ` Kalle Valo
2014-05-23  7:09     ` Michal Kazior
2014-05-23  7:09       ` Michal Kazior
2014-05-22 16:42   ` Kalle Valo
2014-05-22 16:42     ` Kalle Valo
2014-05-23  7:13     ` Michal Kazior
2014-05-23  7:13       ` Michal Kazior
2014-05-23  7:16       ` Kalle Valo
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   ` Michal Kazior
2014-05-23 10:28   ` [PATCH v2 1/3] ath10k: relocate core create/destroy functions Michal Kazior
2014-05-23 10:28     ` Michal Kazior
2014-05-23 10:28   ` [PATCH v2 2/3] ath10k: remove unnecessary tasklet_kill() Michal Kazior
2014-05-23 10:28     ` Michal Kazior
2014-05-23 10:28   ` [PATCH v2 3/3] ath10k: make core registering async Michal Kazior
2014-05-23 10:28     ` Michal Kazior
2014-05-26  9:45   ` [PATCH 0/3] ath10k: async pci probing Kalle Valo
2014-05-26  9:45     ` 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=1403526767.4418.24.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 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.