• Marcel Holtmann's avatar
    [Bluetooth] Fix race for incoming connections · 1824f340
    Marcel Holtmann authored
    This patch fixes a racing condition in accepting incoming RFCOMM
    connections. If a SABM command frame occurs in data packet right
    after L2CAP configuration request packet and there is no active
    session yet then the kernel RFCOMM thread wakes up only once and
    creates a new session. But it does not process SABM frame from
    second data packet waiting in the queue. Connection setup hangs
    and the other side is waiting for UA frame response, but the
    kernel thread keeps sleeping. A possible solution is to force
    additional thread wakeup right after successful creation of the
    new session.
    
    Patch from Dmitri Khokhlov <dkhokhlov@hotmail.com>
    1824f340
core.c 43.8 KB