Re: [RFC/PATCH] Bluetooth: prevent double l2cap_chan_destroy

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

Hi Minho,

* Minho Ban <mhban@xxxxxxxxxxx> [2012-05-21 09:56:40 +0900]:

> l2cap_sock_kill can be called in l2cap_sock_release and l2cap_sock_close_cb
> either. This lead l2cap_chan_destroy to be called twice for same channel.
> To prevent double list_del and double chan_put, chan_destroy should be protected
> with chan->refcnt and chan_list_lock so that reentrance could be forbidden.

Even if l2cap_sock_kill() is called twice it will call l2cap_chan_destroy()
only once. If this is not happening we just have a broken piece of code
somewhere else and not here.

	Gustavo
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux Kernel Discussion]     [Ethernet Bridging]     [Linux Wireless Networking]     [Linux Bluetooth Networking]     [Linux Networking Users]     [VLAN]     [Git]     [IETF Annouce]     [Linux Assembly]     [Security]     [Bugtraq]     [Photo]     [Singles Social Networking]     [Yosemite Information]     [MIPS Linux]     [ARM Linux Kernel]     [ARM Linux]     [Linux Virtualization]     [Linux Security]     [Linux IDE]     [Linux RAID]     [Linux SCSI]     [Free Dating]

Add to Google Powered by Linux