linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: David Herrmann <dh.herrmann@googlemail.com>
Cc: linux-bluetooth@vger.kernel.org, padovan@profusion.mobi
Subject: Re: [PATCH 2/2] Bluetooth: bnep: Fix module reference
Date: Sat, 19 Nov 2011 13:54:06 +0100	[thread overview]
Message-ID: <1321707246.1894.2.camel@aeonflux> (raw)
In-Reply-To: <1321705413-2598-2-git-send-email-dh.herrmann@googlemail.com>

Hi David,

> We cannot call module_put(THIS_MODULE) if this is our last reference. Otherwise,
> this call may cleanup our module before it returns.
> 
> Gladly, the kthread API provides a simple wrapper for us. So lets use
> module_put_and_exit() to avoid a race condition with the module cleanup code.
> 
> Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
> ---
>  net/bluetooth/bnep/core.c |    8 +++-----
>  1 files changed, 3 insertions(+), 5 deletions(-)

Acked-by: Marcel Holtmann <marcel@holtmann.org>

Regards

Marcel



  reply	other threads:[~2011-11-19 12:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-19 12:23 [PATCH 1/2] Bluetooth: cmtp: Fix module reference David Herrmann
2011-11-19 12:23 ` [PATCH 2/2] Bluetooth: bnep: " David Herrmann
2011-11-19 12:54   ` Marcel Holtmann [this message]
2011-11-21 16:30   ` Gustavo Padovan
2011-11-19 12:53 ` [PATCH 1/2] Bluetooth: cmtp: " Marcel Holtmann

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=1321707246.1894.2.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=dh.herrmann@googlemail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=padovan@profusion.mobi \
    /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).