OSDN Git Service

wil6210: fix race conditions in p2p listen and search
authorLior David <qca_liord@qca.qualcomm.com>
Wed, 9 Mar 2016 08:02:04 +0000 (10:02 +0200)
committerKyle Yan <kyan@codeaurora.org>
Fri, 27 May 2016 21:52:50 +0000 (14:52 -0700)
commit640664b4d9f2be516442f43ab16f1dbc9da9780d
tree6110a6bdf5ab24e70ee6faa97672861da269ebbd
parent9be37d74ff75f745c1ce68d78eb0a49260459b98
wil6210: fix race conditions in p2p listen and search

Fix 2 race conditions found during test runs of P2P discovery:
1. Because wil_p2p_cancel_listen was not protected, user space
could start a new P2P listen/search before wmi_stop_discovery
completed. This caused a crash in the firmware.
2. In P2P listen, when listen timer expires and user space calls
cancel_remain_on_channel at the same time, code could send the
cfg80211_remain_on_channel_expired notification twice.

Added protections with wil->mutex to several places that call
wmi_stop_discovery.

Change-Id: I692113c222f278d6c4d4c282b4df0e28b0933556
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 280ab987ef21d1c196acb3af4663a99f94d9da00
Git-repo: https://github.com/kvalo/ath.git
CRs-Fixed: 982931
Signed-off-by: Maya Erez <merez@codeaurora.org>
drivers/net/wireless/ath/wil6210/cfg80211.c
drivers/net/wireless/ath/wil6210/main.c
drivers/net/wireless/ath/wil6210/p2p.c
drivers/net/wireless/ath/wil6210/wil6210.h