浏览代码

ath10k: add missing mutex unlock on failpath

Kernel would complain about leaving a held lock
after going back to userspace and would
subsequently deadlock.

Fixes: e04cafbc38c7 ("ath10k: fix peer limit enforcement")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Michal Kazior 10 年之前
父节点
当前提交
503422d952
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      drivers/net/wireless/ath/ath10k/mac.c

+ 2 - 1
drivers/net/wireless/ath/ath10k/mac.c

@@ -4144,7 +4144,8 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,
 
 
 	if (ar->num_peers >= ar->max_num_peers) {
 	if (ar->num_peers >= ar->max_num_peers) {
 		ath10k_warn(ar, "refusing vdev creation due to insufficient peer entry resources in firmware\n");
 		ath10k_warn(ar, "refusing vdev creation due to insufficient peer entry resources in firmware\n");
-		return -ENOBUFS;
+		ret = -ENOBUFS;
+		goto err;
 	}
 	}
 
 
 	if (ar->free_vdev_map == 0) {
 	if (ar->free_vdev_map == 0) {