]> git.karo-electronics.de Git - karo-tx-linux.git/commit
greybus: connection: fix protocol tear-down race
authorJohan Hovold <johan@hovoldconsulting.com>
Tue, 14 Jul 2015 13:43:32 +0000 (15:43 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 15 Jul 2015 19:39:13 +0000 (12:39 -0700)
commit7f1b67cd535673cef9b9c9fa772d04015f64bd8e
treeb1567b9bf0da1f431595dc7c499e8a9a9c32f845
parent008974cb528d301895797fec0f7d4fd64d01fce0
greybus: connection: fix protocol tear-down race

Make sure to cancel all active operations before calling protocol
connection_exit to prevent use-after-free issues when the protocol state
is being deallocated (e.g. late processing of already-queued requests or
completions).

Note that already-queued requests or completions will be processed as
part of cancellation.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/connection.c