usb: misc: diag_bridge: Clean the driver to fix races
There can be potential race conditions between disconnect and
open, disconnect and close, close and read/write etc. To fix
these, allocate __dev in module init, keep the functions under
lock protection, and check for dev->ifc in open/close functions.
While at it, clean unwanted/outdated PID support. Also fail probe
for configurations having single interface.
Change-Id: I6127429733e4e00ff0763f11d56051ce5d751fb1
Signed-off-by:
Ajay Agarwal <ajaya@codeaurora.org>
Loading
Please register or sign in to comment