This repository has been archived on 2026-03-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
ubports_kernel_google_msm/drivers/char
Jack Pham fa64b90c95 diag: hsic: Fix improper opening/closing of diag_bridge.
diag_bridge_open/close should not be called multiple times, as it
would incorrectly increase/decrease the internal reference counter.
This could respectively lead to either a stale device structure when
HSIC is disconnected, or a NULL pointer when HSIC is reconnected.

Fix this by adding a check in the bridge open routine to disallow
further calls if the bridge is already open, and similarly in close
to no-op if the bridge isn't open. Also add a mutex to the diagfwd
driver to serialize access to the various state variables such as
hsic_device_enabled and hsic_device_opened and to prevent near-
simultaneous calls to diag_bridge_open. In particular, the platform
device probe (or remove) and the callback for cable connect
(disconnect) could potentially execute concurrently; only one should
"win" calling diag_bridge_open (or close) successfully.

CRs-fixed: 395637
(cherry-picked from commit fbd2255d98381e473c1438848ade2572acd5fa46)
Signed-off-by: Jack Pham <jackp@codeaurora.org>

Change-Id: I8322148b7c32a64e9bccbc2e4dc99f1e650335c4
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:23:42 -08:00
..
2013-02-25 11:29:22 -08:00
2013-02-25 11:29:25 -08:00
2013-02-25 11:29:26 -08:00
2012-03-28 18:30:03 +01:00
2011-03-31 11:26:23 -03:00
2011-02-02 15:28:19 +01:00
2012-03-28 18:30:03 +01:00
2012-03-28 18:30:03 +01:00
2011-03-31 11:26:23 -03:00
2012-03-28 18:30:03 +01:00
2011-01-10 08:51:44 -08:00
2010-10-15 15:53:27 +02:00
2012-02-09 23:09:37 +01:00