• Peter Zijlstra's avatar
    rfcomm, sched/wait: Fix broken wait construct · eedf7e47
    Peter Zijlstra authored
    rfcomm_run() is a tad broken in that is has a nested wait loop. One
    cannot rely on p->state for the outer wait because the inner wait will
    overwrite it.
    
    Fix this using the new wait_woken() facility.
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Peter Hurley <peter@hurleysoftware.com>
    Cc: Alexander Holler <holler@ahsoftware.de>
    Cc: David S. Miller <davem@davemloft.net>
    Cc: Gustavo Padovan <gustavo@padovan.org>
    Cc: Joe Perches <joe@perches.com>
    Cc: Johan Hedberg <johan.hedberg@gmail.com>
    Cc: Libor Pechacek <lpechacek@suse.cz>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Marcel Holtmann <marcel@holtmann.org>
    Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
    Cc: Vignesh Raman <Vignesh_Raman@mentor.com>
    Cc: linux-bluetooth@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    eedf7e47
core.c 50.6 KB