From: Dan Carpenter <dan.carpenter@oracle.com>
To: michal.kazior@tieto.com
Cc: ath10k@lists.infradead.org
Subject: re: ath10k: fix peer limit enforcement
Date: Tue, 18 Aug 2015 22:01:31 +0300 [thread overview]
Message-ID: <20150818190131.GA24548@mwanda> (raw)
Hello Michal Kazior,
The patch e04cafbc38c7: "ath10k: fix peer limit enforcement" from Aug
5, 2015, leads to the following static checker warning:
drivers/net/wireless/ath/ath10k/mac.c:4365 ath10k_add_interface()
warn: inconsistent returns 'mutex:&ar->conf_mutex'.
Locked on: line 4125
Unlocked on: line 4344
line 4365
drivers/net/wireless/ath/ath10k/mac.c
4098 int i;
4099 u32 vdev_param;
4100
4101 vif->driver_flags |= IEEE80211_VIF_SUPPORTS_UAPSD;
4102
4103 mutex_lock(&ar->conf_mutex);
^^^^^^^^^^^^^^^^^^^^^^^^^^
Lock.
4104
4105 memset(arvif, 0, sizeof(*arvif));
4106
4107 arvif->ar = ar;
4108 arvif->vif = vif;
4109
4110 INIT_LIST_HEAD(&arvif->list);
4111 INIT_WORK(&arvif->ap_csa_work, ath10k_mac_vif_ap_csa_work);
4112 INIT_DELAYED_WORK(&arvif->connection_loss_work,
4113 ath10k_mac_vif_sta_connection_loss_work);
4114
4115 for (i = 0; i < ARRAY_SIZE(arvif->bitrate_mask.control); i++) {
4116 arvif->bitrate_mask.control[i].legacy = 0xffffffff;
4117 memset(arvif->bitrate_mask.control[i].ht_mcs, 0xff,
4118 sizeof(arvif->bitrate_mask.control[i].ht_mcs));
4119 memset(arvif->bitrate_mask.control[i].vht_mcs, 0xff,
4120 sizeof(arvif->bitrate_mask.control[i].vht_mcs));
4121 }
4122
4123 if (ar->num_peers >= ar->max_num_peers) {
4124 ath10k_warn(ar, "refusing vdev creation due to insufficient peer entry resources in firmware\n");
4125 return -ENOBUFS;
Can't return directly. We're holding a lock.
4126 }
4127
4128 if (ar->free_vdev_map == 0) {
4129 ath10k_warn(ar, "Free vdev map is empty, no more interfaces allowed.\n");
4130 ret = -EBUSY;
4131 goto err;
4132 }
4133 bit = __ffs64(ar->free_vdev_map);
regards,
dan carpenter
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
next reply other threads:[~2015-08-18 19:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-18 19:01 Dan Carpenter [this message]
2015-08-19 11:19 ` ath10k: fix peer limit enforcement Michal Kazior
2015-08-19 12:41 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150818190131.GA24548@mwanda \
--to=dan.carpenter@oracle.com \
--cc=ath10k@lists.infradead.org \
--cc=michal.kazior@tieto.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.