linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: linux-wireless@vger.kernel.org,
	"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [PATCH] lib80211: call try_module_get() in lib80211_get_crypto_ops()
Date: Thu, 28 Jul 2011 23:02:14 -0400	[thread overview]
Message-ID: <4E3222B6.1010904@gnu.org> (raw)
In-Reply-To: <20110729025007.7889.19879.stgit@mj.roinet.com>

On 07/28/2011 10:50 PM, Pavel Roskin wrote:
> Doing it by the caller is racy.  Some callers neglected to do so.  Fix
> callers not to call try_module_get() after lib80211_get_crypto_ops().
>
> When ops is copied, move lib80211_crypt_delayed_deinit() after
> try_module_get() to avoid the risk that the module would be unloaded
> between those calls.
>
> Signed-off-by: Pavel Roskin<proski@gnu.org>

Sorry, please ignore this patch!  I didn't mean to send it.  It's not 
complete, and I don't think I'll have time to fix it :(

lib80211 has a terrible API, and the module referencing is split between 
lib80211 and the callers.  Everything is too complicated.  Keys may be 
freed asynchronously.  Module referencing is tied to the keys and not to 
the ops.  I've seen the reference count for lib80211_crypt_ccmp to 
underflow and become 4294967295 or something.

Considering that lib80211 is only used by old modules, I'm even thinking 
of making lib80211_crypt_* modules not unloadable.  It's too much work 
to fix.

What I actually intended to send is "lib80211: remove exports for 
functions not called by other modules".  That "simplifies" the API a 
little bit.

-- 
Regards,
Pavel Roskin

  reply	other threads:[~2011-07-29  3:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-29  2:50 [PATCH] lib80211: call try_module_get() in lib80211_get_crypto_ops() Pavel Roskin
2011-07-29  3:02 ` Pavel Roskin [this message]
2011-07-29  3:27   ` Julian Calaby
2011-07-29 15:55     ` Pavel Roskin

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=4E3222B6.1010904@gnu.org \
    --to=proski@gnu.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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;
as well as URLs for NNTP newsgroup(s).