greybus: operation: fix outgoing-response corruption
authorJohan Hovold <johan@hovoldconsulting.com>
Thu, 9 Jul 2015 13:18:00 +0000 (15:18 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 13 Jul 2015 22:29:27 +0000 (15:29 -0700)
commit048a7ffe274280c27fc572ba3ec7150eba6efc40
tree7e6c096e6fee721bf8af089389377c2d7e7affe6
parent0581f28efb86d8eb7e7f6baf712578477f7c868e
greybus: operation: fix outgoing-response corruption

Fix potential corruption of outgoing responses by verifying that the
operations is indeed outgoing when receiving a response.

Failure to do so could lead to an incoming response corrupting an
outgoing response that uses the same operation id.

Reported-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/operation.c