]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
greybus: hd: fix host-device-removal race
authorJohan Hovold <johan@hovoldconsulting.com>
Thu, 28 Jan 2016 11:43:29 +0000 (12:43 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 28 Jan 2016 16:10:56 +0000 (08:10 -0800)
commit24988d3a253303be63c460071dd99bd4674c0880
tree2ca15cee5451f300e3c6801dd522ded8c883ddf5
parent3b710ec06e00ce041606678b25f9c82e95fde813
greybus: hd: fix host-device-removal race

Make sure to tear down the svc and flush any on-going hotplug processing
before removing the remaining interfaces.

This fixes crashes due to host-device removal racing with svc
hotplug/unplug processing (e.g. at "UniPro restart").

Testing Done:
Verified that this fixes crashes reproducible on SDB when unloading the
host-device driver module while generating hotplug/unplug events.

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