<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/net/mac80211, branch v3.3-rc4</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>mac80211: Fix a rwlock bad magic bug</title>
<updated>2012-02-09T20:16:04+00:00</updated>
<author>
<name>Mohammed Shafi Shajakhan</name>
<email>mohammed@qca.qualcomm.com</email>
</author>
<published>2012-02-09T14:29:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b57e6b560fc2a2742910ac5ca0eb2c46e45aeac2'/>
<id>b57e6b560fc2a2742910ac5ca0eb2c46e45aeac2</id>
<content type='text'>
read_lock(&amp;tpt_trig-&gt;trig.leddev_list_lock) is accessed via the path
ieee80211_open (-&gt;) ieee80211_do_open (-&gt;) ieee80211_mod_tpt_led_trig
(-&gt;) ieee80211_start_tpt_led_trig (-&gt;) tpt_trig_timer before initializing
it.
the intilization of this read/write lock happens via the path
ieee80211_led_init (-&gt;) led_trigger_register, but we are doing
'ieee80211_led_init'  after 'ieeee80211_if_add' where we
register netdev_ops.
so we access leddev_list_lock before initializing it and causes the
following bug in chrome laptops with AR928X cards with the following
script

while true
do
sudo modprobe -v ath9k
sleep 3
sudo modprobe -r ath9k
sleep 3
done

	BUG: rwlock bad magic on CPU#1, wpa_supplicant/358, f5b9eccc
	Pid: 358, comm: wpa_supplicant Not tainted 3.0.13 #1
	Call Trace:

	[&lt;8137b9df&gt;] rwlock_bug+0x3d/0x47
	[&lt;81179830&gt;] do_raw_read_lock+0x19/0x29
	[&lt;8137f063&gt;] _raw_read_lock+0xd/0xf
	[&lt;f9081957&gt;] tpt_trig_timer+0xc3/0x145 [mac80211]
	[&lt;f9081f3a&gt;] ieee80211_mod_tpt_led_trig+0x152/0x174 [mac80211]
	[&lt;f9076a3f&gt;] ieee80211_do_open+0x11e/0x42e [mac80211]
	[&lt;f9075390&gt;] ? ieee80211_check_concurrent_iface+0x26/0x13c [mac80211]
	[&lt;f9076d97&gt;] ieee80211_open+0x48/0x4c [mac80211]
	[&lt;812dbed8&gt;] __dev_open+0x82/0xab
	[&lt;812dc0c9&gt;] __dev_change_flags+0x9c/0x113
	[&lt;812dc1ae&gt;] dev_change_flags+0x18/0x44
	[&lt;8132144f&gt;] devinet_ioctl+0x243/0x51a
	[&lt;81321ba9&gt;] inet_ioctl+0x93/0xac
	[&lt;812cc951&gt;] sock_ioctl+0x1c6/0x1ea
	[&lt;812cc78b&gt;] ? might_fault+0x20/0x20
	[&lt;810b1ebb&gt;] do_vfs_ioctl+0x46e/0x4a2
	[&lt;810a6ebb&gt;] ? fget_light+0x2f/0x70
	[&lt;812ce549&gt;] ? sys_recvmsg+0x3e/0x48
	[&lt;810b1f35&gt;] sys_ioctl+0x46/0x69
	[&lt;8137fa77&gt;] sysenter_do_call+0x12/0x2

Cc: &lt;stable@vger.kernel.org&gt;
Cc: Gary Morain &lt;gmorain@google.com&gt;
Cc: Paul Stewart &lt;pstew@google.com&gt;
Cc: Abhijit Pradhan &lt;abhijit@qca.qualcomm.com&gt;
Cc: Vasanthakumar Thiagarajan &lt;vthiagar@qca.qualcomm.com&gt;
Cc: Rajkumar Manoharan &lt;rmanohar@qca.qualcomm.com&gt;
Acked-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Tested-by: Mohammed Shafi Shajakhan &lt;mohammed@qca.qualcomm.com&gt;
Signed-off-by: Mohammed Shafi Shajakhan &lt;mohammed@qca.qualcomm.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
read_lock(&amp;tpt_trig-&gt;trig.leddev_list_lock) is accessed via the path
ieee80211_open (-&gt;) ieee80211_do_open (-&gt;) ieee80211_mod_tpt_led_trig
(-&gt;) ieee80211_start_tpt_led_trig (-&gt;) tpt_trig_timer before initializing
it.
the intilization of this read/write lock happens via the path
ieee80211_led_init (-&gt;) led_trigger_register, but we are doing
'ieee80211_led_init'  after 'ieeee80211_if_add' where we
register netdev_ops.
so we access leddev_list_lock before initializing it and causes the
following bug in chrome laptops with AR928X cards with the following
script

while true
do
sudo modprobe -v ath9k
sleep 3
sudo modprobe -r ath9k
sleep 3
done

	BUG: rwlock bad magic on CPU#1, wpa_supplicant/358, f5b9eccc
	Pid: 358, comm: wpa_supplicant Not tainted 3.0.13 #1
	Call Trace:

	[&lt;8137b9df&gt;] rwlock_bug+0x3d/0x47
	[&lt;81179830&gt;] do_raw_read_lock+0x19/0x29
	[&lt;8137f063&gt;] _raw_read_lock+0xd/0xf
	[&lt;f9081957&gt;] tpt_trig_timer+0xc3/0x145 [mac80211]
	[&lt;f9081f3a&gt;] ieee80211_mod_tpt_led_trig+0x152/0x174 [mac80211]
	[&lt;f9076a3f&gt;] ieee80211_do_open+0x11e/0x42e [mac80211]
	[&lt;f9075390&gt;] ? ieee80211_check_concurrent_iface+0x26/0x13c [mac80211]
	[&lt;f9076d97&gt;] ieee80211_open+0x48/0x4c [mac80211]
	[&lt;812dbed8&gt;] __dev_open+0x82/0xab
	[&lt;812dc0c9&gt;] __dev_change_flags+0x9c/0x113
	[&lt;812dc1ae&gt;] dev_change_flags+0x18/0x44
	[&lt;8132144f&gt;] devinet_ioctl+0x243/0x51a
	[&lt;81321ba9&gt;] inet_ioctl+0x93/0xac
	[&lt;812cc951&gt;] sock_ioctl+0x1c6/0x1ea
	[&lt;812cc78b&gt;] ? might_fault+0x20/0x20
	[&lt;810b1ebb&gt;] do_vfs_ioctl+0x46e/0x4a2
	[&lt;810a6ebb&gt;] ? fget_light+0x2f/0x70
	[&lt;812ce549&gt;] ? sys_recvmsg+0x3e/0x48
	[&lt;810b1f35&gt;] sys_ioctl+0x46/0x69
	[&lt;8137fa77&gt;] sysenter_do_call+0x12/0x2

Cc: &lt;stable@vger.kernel.org&gt;
Cc: Gary Morain &lt;gmorain@google.com&gt;
Cc: Paul Stewart &lt;pstew@google.com&gt;
Cc: Abhijit Pradhan &lt;abhijit@qca.qualcomm.com&gt;
Cc: Vasanthakumar Thiagarajan &lt;vthiagar@qca.qualcomm.com&gt;
Cc: Rajkumar Manoharan &lt;rmanohar@qca.qualcomm.com&gt;
Acked-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Tested-by: Mohammed Shafi Shajakhan &lt;mohammed@qca.qualcomm.com&gt;
Signed-off-by: Mohammed Shafi Shajakhan &lt;mohammed@qca.qualcomm.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: timeout a single frame in the rx reorder buffer</title>
<updated>2012-02-01T20:26:00+00:00</updated>
<author>
<name>Eliad Peller</name>
<email>eliad@wizery.com</email>
</author>
<published>2012-02-01T16:48:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=07ae2dfcf4f7143ce191c6436da1c33f179af0d6'/>
<id>07ae2dfcf4f7143ce191c6436da1c33f179af0d6</id>
<content type='text'>
The current code checks for stored_mpdu_num &gt; 1, causing
the reorder_timer to be triggered indefinitely, but the
frame is never timed-out (until the next packet is received)

Signed-off-by: Eliad Peller &lt;eliad@wizery.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Acked-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current code checks for stored_mpdu_num &gt; 1, causing
the reorder_timer to be triggered indefinitely, but the
frame is never timed-out (until the next packet is received)

Signed-off-by: Eliad Peller &lt;eliad@wizery.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Acked-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: set bss_conf.idle when vif is connected</title>
<updated>2012-01-24T19:47:09+00:00</updated>
<author>
<name>Eliad Peller</name>
<email>eliad@wizery.com</email>
</author>
<published>2012-01-11T11:11:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=405385f8ce7a2ed8f82e216d88b5282142e1288b'/>
<id>405385f8ce7a2ed8f82e216d88b5282142e1288b</id>
<content type='text'>
__ieee80211_recalc_idle() iterates through the vifs,
sets bss_conf.idle = true if they are disconnected,
and increases "count" if they are not (which later
gets evaluated in order to determine whether the
device is idle).

However, the loop doesn't set bss_conf.idle = false
(along with increasing "count"), causing the device
idle state and the vif idle state to get out of sync
in some cases.

Signed-off-by: Eliad Peller &lt;eliad@wizery.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
__ieee80211_recalc_idle() iterates through the vifs,
sets bss_conf.idle = true if they are disconnected,
and increases "count" if they are not (which later
gets evaluated in order to determine whether the
device is idle).

However, the loop doesn't set bss_conf.idle = false
(along with increasing "count"), causing the device
idle state and the vif idle state to get out of sync
in some cases.

Signed-off-by: Eliad Peller &lt;eliad@wizery.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: update oper_channel on ibss join</title>
<updated>2012-01-24T19:47:09+00:00</updated>
<author>
<name>Eliad Peller</name>
<email>eliad@wizery.com</email>
</author>
<published>2012-01-10T13:19:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ba1960257c5980f9b58057995ce3394bd8e48ca3'/>
<id>ba1960257c5980f9b58057995ce3394bd8e48ca3</id>
<content type='text'>
Commit 13c40c5 ("mac80211: Add HT operation modes for IBSS") broke
ibss operation by mistakenly removing the local-&gt;oper_channel
update (causing ibss to start on the wrong channel). fix it.

Signed-off-by: Eliad Peller &lt;eliad@wizery.com&gt;
Acked-by: Simon Wunderlich &lt;siwu@hrz.tu-chemnitz.de&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 13c40c5 ("mac80211: Add HT operation modes for IBSS") broke
ibss operation by mistakenly removing the local-&gt;oper_channel
update (causing ibss to start on the wrong channel). fix it.

Signed-off-by: Eliad Peller &lt;eliad@wizery.com&gt;
Acked-by: Simon Wunderlich &lt;siwu@hrz.tu-chemnitz.de&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: fix work removal on deauth request</title>
<updated>2012-01-18T19:38:06+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2012-01-18T13:10:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bc4934bc61d0a11fd62c5187ff83645628f8be8b'/>
<id>bc4934bc61d0a11fd62c5187ff83645628f8be8b</id>
<content type='text'>
When deauth is requested while an auth or assoc
work item is in progress, we currently delete it
without regard for any state it might need to
clean up. Fix it by cleaning up for those items.

In the case Pontus found, the problem manifested
itself as such:

authenticate with 00:23:69:aa:dd:7b (try 1)
authenticated
failed to insert Dummy STA entry for the AP (error -17)
deauthenticating from 00:23:69:aa:dd:7b by local choice (reason=2)

It could also happen differently if the driver
uses the tx_sync callback.

We can't just call the -&gt;done() method of the work
items because that will lock up due to the locking
in cfg80211. This fix isn't very clean, but that
seems acceptable since I have patches pending to
remove this code completely.

Cc: stable@vger.kernel.org
Reported-by: Pontus Fuchs &lt;pontus.fuchs@gmail.com&gt;
Tested-by: Pontus Fuchs &lt;pontus.fuchs@gmail.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When deauth is requested while an auth or assoc
work item is in progress, we currently delete it
without regard for any state it might need to
clean up. Fix it by cleaning up for those items.

In the case Pontus found, the problem manifested
itself as such:

authenticate with 00:23:69:aa:dd:7b (try 1)
authenticated
failed to insert Dummy STA entry for the AP (error -17)
deauthenticating from 00:23:69:aa:dd:7b by local choice (reason=2)

It could also happen differently if the driver
uses the tx_sync callback.

We can't just call the -&gt;done() method of the work
items because that will lock up due to the locking
in cfg80211. This fix isn't very clean, but that
seems acceptable since I have patches pending to
remove this code completely.

Cc: stable@vger.kernel.org
Reported-by: Pontus Fuchs &lt;pontus.fuchs@gmail.com&gt;
Tested-by: Pontus Fuchs &lt;pontus.fuchs@gmail.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: Use the right headroom size for mesh mgmt frames</title>
<updated>2012-01-18T19:38:06+00:00</updated>
<author>
<name>Javier Cardona</name>
<email>javier@cozybit.com</email>
</author>
<published>2012-01-18T02:17:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=65e8b0ccb6cf176f8eddb1b05534be46580da9dd'/>
<id>65e8b0ccb6cf176f8eddb1b05534be46580da9dd</id>
<content type='text'>
Use local-&gt;tx_headroom instad of local-&gt;hw.extra_tx_headroom.
local-&gt;tx_headroom is the max of hw.extra_tx_headroom required by the
driver and the headroom required by mac80211 for status reporting.  On
drivers where hw.extra_tx_headroom is smaller than what mac80211
requires (e.g. ath5k), we would not reserve sufficient buffer space to
report tx status.

Also, don't reserve local-&gt;tx_headroom + local-&gt;hw.extra_tx_headroom.

Reported-by: Simon Morgenthaler &lt;s.morgenthaler@students.unibe.ch&gt;
Reported-by: Kai Scharwies &lt;kai@scharwies.de&gt;
Signed-off-by: Javier Cardona &lt;javier@cozybit.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use local-&gt;tx_headroom instad of local-&gt;hw.extra_tx_headroom.
local-&gt;tx_headroom is the max of hw.extra_tx_headroom required by the
driver and the headroom required by mac80211 for status reporting.  On
drivers where hw.extra_tx_headroom is smaller than what mac80211
requires (e.g. ath5k), we would not reserve sufficient buffer space to
report tx status.

Also, don't reserve local-&gt;tx_headroom + local-&gt;hw.extra_tx_headroom.

Reported-by: Simon Morgenthaler &lt;s.morgenthaler@students.unibe.ch&gt;
Reported-by: Kai Scharwies &lt;kai@scharwies.de&gt;
Signed-off-by: Javier Cardona &lt;javier@cozybit.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: fix debugfs key-&gt;station symlink</title>
<updated>2012-01-18T19:38:05+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2012-01-17T09:32:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9446f3efc53512e5ad9e0966539021a2a41fe5a0'/>
<id>9446f3efc53512e5ad9e0966539021a2a41fe5a0</id>
<content type='text'>
Since stations moved into a virtual interface
subdirectory, this link has been broken. Fix it.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since stations moved into a virtual interface
subdirectory, this link has been broken. Fix it.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: Fix possible race between sta_unblock and network softirq</title>
<updated>2012-01-17T15:12:27+00:00</updated>
<author>
<name>Helmut Schaa</name>
<email>helmut.schaa@googlemail.com</email>
</author>
<published>2012-01-17T08:22:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=544204733a20200951c271f81c74930ba5424638'/>
<id>544204733a20200951c271f81c74930ba5424638</id>
<content type='text'>
All other code paths in sta_unblock synchronize with the network
softirq by using local_bh_disable/enable. Do the same around
ieee80211_sta_ps_deliver_wakeup.

Signed-off-by: Helmut Schaa &lt;helmut.schaa@googlemail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All other code paths in sta_unblock synchronize with the network
softirq by using local_bh_disable/enable. Do the same around
ieee80211_sta_ps_deliver_wakeup.

Signed-off-by: Helmut Schaa &lt;helmut.schaa@googlemail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: fix tx-&gt;skb NULL pointer dereference</title>
<updated>2012-01-16T20:01:16+00:00</updated>
<author>
<name>Yoni Divinsky</name>
<email>yoni.divinsky@ti.com</email>
</author>
<published>2012-01-16T13:18:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d32a102819eef99d4d87019266bea208447be0a0'/>
<id>d32a102819eef99d4d87019266bea208447be0a0</id>
<content type='text'>
In function ieee80211_tx_h_encrypt the var info was
initialized from tx-&gt;skb, since the fucntion
is called after the function ieee80211_tx_h_fragment
tx-&gt;skb is not valid anymore.

Signed-off-by: Yoni Divinsky &lt;yoni.divinsky@ti.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In function ieee80211_tx_h_encrypt the var info was
initialized from tx-&gt;skb, since the fucntion
is called after the function ieee80211_tx_h_fragment
tx-&gt;skb is not valid anymore.

Signed-off-by: Yoni Divinsky &lt;yoni.divinsky@ti.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Net, mac80211: Fix resource leak in ieee80211_rx_h_mesh_fwding()</title>
<updated>2012-01-16T20:01:15+00:00</updated>
<author>
<name>Jesper Juhl</name>
<email>jj@chaosbits.net</email>
</author>
<published>2012-01-14T20:52:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=74b8cc3d592e5e884123eb99960a9f064223eaab'/>
<id>74b8cc3d592e5e884123eb99960a9f064223eaab</id>
<content type='text'>
We may leak the 'fwd_skb' we skb_copy() in ieee80211_rx_h_mesh_fwding() if
we take the 'else' branch in the 'if' statement just below. If we take
that branch we'll end up returning from the function and since we've not
assigned 'fwd_skb' to anything at that point, we leak it when the variable
goes out of scope.

The simple fix seems to be to just kfree_skb(fwd_skb); just before we
return. That is what this patch does.

Signed-off-by: Jesper Juhl &lt;jj@chaosbits.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We may leak the 'fwd_skb' we skb_copy() in ieee80211_rx_h_mesh_fwding() if
we take the 'else' branch in the 'if' statement just below. If we take
that branch we'll end up returning from the function and since we've not
assigned 'fwd_skb' to anything at that point, we leak it when the variable
goes out of scope.

The simple fix seems to be to just kfree_skb(fwd_skb); just before we
return. That is what this patch does.

Signed-off-by: Jesper Juhl &lt;jj@chaosbits.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
