lkml.org 
[lkml]   [2012]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC/PATCH] Bluetooth: prevent double l2cap_chan_destroy
    Hi Minho,

    * Minho Ban <mhban@samsung.com> [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


    \
     
     \ /
      Last update: 2012-05-21 19:01    [W:8.295 / U:0.072 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site