qcacld-3.0: Fix use-after-free crash for trace buffer

There is a race condition between hdd_disconnect_handler and
cds_pkt_proto_trace_close while trying to update the trace_buffer.

Fix race condition by calling cds_pkt_proto_trace_deinit (formerly
cds_pkt_proto_trace_close) at the end of cds_close, after all the threads
have been torn down and other modules have been shut. Similarly,
call cds_pkt_proto_trace_init at the begining of cds_open, so it gets
initialized before any of the threads are up or any modules have been
initialized.

Change-Id: If9e2d6a360d814b7f1b0c92789dc0fd3fe3d974b
CRs-Fixed: 1009162
4 files changed
tree: 5ff6bd5d0f6ac885158b35b1e2153d2b0bc5bf91
  1. config/
  2. core/
  3. target/
  4. uapi/
  5. Android.mk
  6. Kbuild
  7. Kconfig
  8. Makefile
  9. README.txt