Re: Empty critical section issue in Bluetooth Linux driver code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux