greybus: operation: fix cancellation use-after-free
authorJohan Hovold <johan@hovoldconsulting.com>
Wed, 1 Jul 2015 10:37:25 +0000 (12:37 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 1 Jul 2015 23:50:59 +0000 (16:50 -0700)
commit73f9d73f124ccba16403971b5101d4a947161481
treeca2abe90694102e96f22a72c4db4508b0a9411da
parentabb722e79a07b0a438a3782fd3f7d8c85f541d5f
greybus: operation: fix cancellation use-after-free

The final reference of an operation will be put after its completion
handler has run, so we must not drop the reference if it has already
been scheduled to avoid use-after-free.

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