qcacmn: Protect pktlog under mutex to avoid possible race conditions

Protect pktlog funcitonality under given mutex to avoid possible
race condition between pktlog_release/pktlog_open and pktlogmod_exit.
Also call pktlogmod_exit before calling wdi_event_detach to avoid
accessing freed memory in pktlog release.

Change-Id: I5ca4b304d0f4dc1af289daa167958d5b773d9a6e
CRs-Fixed: 2578623
This commit is contained in:
Alok Kumar
2019-12-03 14:43:20 +05:30
committed by nshrivas
parent 19ba060714
commit a316b315d8
3 changed files with 77 additions and 30 deletions

View File

@@ -625,9 +625,9 @@ void pktlog_init(struct hif_opaque_softc *scn)
pktlog_callback_registration(pl_dev->callback_type);
}
static int __pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
bool ini_triggered, uint8_t user_triggered,
uint32_t is_iwpriv_command)
int __pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
bool ini_triggered, uint8_t user_triggered,
uint32_t is_iwpriv_command)
{
struct pktlog_dev_t *pl_dev;
struct ath_pktlog_info *pl_info;