]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
greybus: core: add defensive connection disable post disconnect
authorJohan Hovold <johan@hovoldconsulting.com>
Tue, 19 Jan 2016 11:51:10 +0000 (12:51 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 19 Jan 2016 20:17:13 +0000 (12:17 -0800)
commit02a54dd18f1eb831f4bf02ac763a4e9d805e1ba3
treee0b21f99c50452d05afc6d1b8a454162ed24e2f8
parentfa8369c130098da3276bafec425822aa74971905
greybus: core: add defensive connection disable post disconnect

Bundle drivers *must* disable their connections in the disconnect
callback, but add a defensive test and warn about buggy drivers
nonetheless.

Note that bundle drivers would generally release their state containers
in disconnect so a failure stop I/O could potentially lead to
use-after-free bugs in any late operation completion callbacks.

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/core.c