OSDN Git Service

greybus: operation: fix use-after-free in response receive path
authorJohan Hovold <johan@hovoldconsulting.com>
Thu, 9 Jul 2015 13:17:59 +0000 (15:17 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 13 Jul 2015 22:29:27 +0000 (15:29 -0700)
commit0581f28efb86d8eb7e7f6baf712578477f7c868e
tree302fb689cc9be3be38b02de0e0d25b37ec1bc616
parent85109f7ddde4b1842bfb08741a8b461e31ef2c4f
greybus: operation: fix use-after-free in response receive path

Fix potential use-after-free in response receive path, due to lack of
reference counting when looking up operations on a connection.

Make sure to acquire a reference to the operation while holding the
connection-list lock.

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