qcacmn: Race condition while using pkt log buffer

There can be a race condition if the pktlog_buf inside pktlog APIs,
is accessed simultanously from two threads.
To prevent this use mutex in the caller functions of pktlog APIs.

Change-Id: Iea6e3cd28a7a347c1753fe71d0646fb43ee184fa
CRs-Fixed: 2047150
This commit is contained in:
Ashish Kumar Dhanotiya
2017-05-15 14:52:40 +05:30
committed by snandini
parent b5621e7d20
commit a55792d148
3 changed files with 108 additions and 9 deletions

View File

@@ -98,6 +98,7 @@ struct ath_pktlog_info {
/* Size of buffer in bytes */
int32_t buf_size;
spinlock_t log_lock;
struct mutex pktlog_mutex;
/* Threshold of TCP SACK packets for triggered stop */
int sack_thr;