]> asedeno.scripts.mit.edu Git - linux.git/commit
greybus: operation: fix use-after-free and infinite loop on unhandled requests
authorJohan Hovold <johan@hovoldconsulting.com>
Fri, 27 Mar 2015 11:41:15 +0000 (12:41 +0100)
committerGreg Kroah-Hartman <greg@kroah.com>
Mon, 30 Mar 2015 13:13:01 +0000 (15:13 +0200)
commitff65be7a58201ca7843813f92192d997a2a4b4ee
treeec5c255a90a5755b8b5bedf7f49d42935abe2587
parentea2c2ee80571388ef4641597c00ca10da3728127
greybus: operation: fix use-after-free and infinite loop on unhandled requests

Make sure to return a proper response in case we get a request we do not
recognise.

This fixes an infinite loop and use-after-free bug, where the freed
operations structure would get re-added to the work queue indefinitely.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/operation.c