linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: fix uninitialized variable
@ 2013-03-28  9:11 Vincent
  2013-03-28  9:21 ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Vincent @ 2013-03-28  9:11 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Vincent Stehlé

Fix one code path where chanctx_conf is tested as being non-NULL while it may
be uninitialized.

This fixes the following warning:

  net/mac80211/tx.c: In function ‘ieee80211_subif_start_xmit’:
  net/mac80211/tx.c:1828:27: warning: ‘chanctx_conf’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Cc: Johannes Berg <johannes@sipsolutions.net>
---
 net/mac80211/tx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 8914d2d..57a5722 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1777,7 +1777,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
 	bool multicast;
 	u32 info_flags = 0;
 	u16 info_id = 0;
-	struct ieee80211_chanctx_conf *chanctx_conf;
+	struct ieee80211_chanctx_conf *chanctx_conf = NULL;
 	struct ieee80211_sub_if_data *ap_sdata;
 	enum ieee80211_band band;
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH] mac80211: fix uninitialized variable
@ 2013-10-18 21:57 Michal Kazior
  2013-10-21 10:26 ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Michal Kazior @ 2013-10-18 21:57 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Michal Kazior

CSA completion could call in a driver
bss_info_changed() with a garbled `changed` flag
leading to all sorts of problems.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 net/mac80211/cfg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 629dee7..fd1f6d1 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2860,7 +2860,7 @@ void ieee80211_csa_finalize_work(struct work_struct *work)
 		container_of(work, struct ieee80211_sub_if_data,
 			     csa_finalize_work);
 	struct ieee80211_local *local = sdata->local;
-	int err, changed;
+	int err, changed = 0;
 
 	if (!ieee80211_sdata_running(sdata))
 		return;
-- 
1.8.4.rc3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-10-21 10:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-28  9:11 [PATCH] mac80211: fix uninitialized variable Vincent
2013-03-28  9:21 ` Johannes Berg
2013-03-28 11:28   ` Sedat Dilek
2013-03-28 11:30     ` Sedat Dilek
2013-03-28 11:32       ` Arnd Bergmann
2013-03-30 15:17   ` Vincent
  -- strict thread matches above, loose matches on Subject: below --
2013-10-18 21:57 Michal Kazior
2013-10-21 10:26 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).