From: Dan Carpenter <error27@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: Empty critical section issue in Bluetooth Linux driver code
Date: Tue, 13 Jul 2010 11:38:51 +0000 [thread overview]
Message-ID: <20100713113851.GJ5658@bicker> (raw)
In-Reply-To: <4C3C4500.3090302@labri.fr>
On Tue, Jul 13, 2010 at 12:50:40PM +0200, "Tegawendé F. Bissyandé" wrote:
> Hi,
>
> I have been using Coccinelle to validate some trivial rules of kernel
> API use by device drivers.
> I came accross the definition of an empty critical section in the
> 'bfusb_close' function in file drivers/bluetooth/bfusb.c
>
> static int bfusb_close(struct hci_dev *hdev)
> {
> ...
> write_lock_irqsave(&data->lock, flags);
> write_unlock_irqrestore(&data->lock, flags);
>
This is in the _close() function. It's waiting for all the readers to
finish. Presumably it's already ensured that no new reader threads will
launch.
regards,
dan carpenter
> bfusb_unlink_urbs(data);
> bfusb_flush(hdev);
>
> return 0;
> }
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2010-07-13 11:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-13 10:50 Empty critical section issue in Bluetooth Linux driver code
2010-07-13 11:38 ` Dan Carpenter [this message]
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=20100713113851.GJ5658@bicker \
--to=error27@gmail.com \
--cc=kernel-janitors@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