<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/wireless, branch v3.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-06-13T08:17:53Z</updated>
<entry>
<title>cfg80211: fix potential deadlock in regulatory</title>
<updated>2012-06-13T08:17:53Z</updated>
<author>
<name>Eliad Peller</name>
<email>eliad@wizery.com</email>
</author>
<published>2012-06-12T09:53:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fe20b39ec32e975f1054c0b7866c873a954adf05'/>
<id>urn:sha1:fe20b39ec32e975f1054c0b7866c873a954adf05</id>
<content type='text'>
reg_timeout_work() calls restore_regulatory_settings() which
takes cfg80211_mutex.

reg_set_request_processed() already holds cfg80211_mutex
before calling cancel_delayed_work_sync(reg_timeout),
so it might deadlock.

Call the async cancel_delayed_work instead, in order
to avoid the potential deadlock.

This is the relevant lockdep warning:

cfg80211: Calling CRDA for country: XX

======================================================
[ INFO: possible circular locking dependency detected ]
3.4.0-rc5-wl+ #26 Not tainted
-------------------------------------------------------
kworker/0:2/1391 is trying to acquire lock:
 (cfg80211_mutex){+.+.+.}, at: [&lt;bf28ae00&gt;] restore_regulatory_settings+0x34/0x418 [cfg80211]

but task is already holding lock:
 ((reg_timeout).work){+.+...}, at: [&lt;c0059e94&gt;] process_one_work+0x1f0/0x480

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-&gt; #2 ((reg_timeout).work){+.+...}:
       [&lt;c008fd44&gt;] validate_chain+0xb94/0x10f0
       [&lt;c0090b68&gt;] __lock_acquire+0x8c8/0x9b0
       [&lt;c0090d40&gt;] lock_acquire+0xf0/0x114
       [&lt;c005b600&gt;] wait_on_work+0x4c/0x154
       [&lt;c005c000&gt;] __cancel_work_timer+0xd4/0x11c
       [&lt;c005c064&gt;] cancel_delayed_work_sync+0x1c/0x20
       [&lt;bf28b274&gt;] reg_set_request_processed+0x50/0x78 [cfg80211]
       [&lt;bf28bd84&gt;] set_regdom+0x550/0x600 [cfg80211]
       [&lt;bf294cd8&gt;] nl80211_set_reg+0x218/0x258 [cfg80211]
       [&lt;c03c7738&gt;] genl_rcv_msg+0x1a8/0x1e8
       [&lt;c03c6a00&gt;] netlink_rcv_skb+0x5c/0xc0
       [&lt;c03c7584&gt;] genl_rcv+0x28/0x34
       [&lt;c03c6720&gt;] netlink_unicast+0x15c/0x228
       [&lt;c03c6c7c&gt;] netlink_sendmsg+0x218/0x298
       [&lt;c03933c8&gt;] sock_sendmsg+0xa4/0xc0
       [&lt;c039406c&gt;] __sys_sendmsg+0x1e4/0x268
       [&lt;c0394228&gt;] sys_sendmsg+0x4c/0x70
       [&lt;c0013840&gt;] ret_fast_syscall+0x0/0x3c

-&gt; #1 (reg_mutex){+.+.+.}:
       [&lt;c008fd44&gt;] validate_chain+0xb94/0x10f0
       [&lt;c0090b68&gt;] __lock_acquire+0x8c8/0x9b0
       [&lt;c0090d40&gt;] lock_acquire+0xf0/0x114
       [&lt;c04734dc&gt;] mutex_lock_nested+0x48/0x320
       [&lt;bf28b2cc&gt;] reg_todo+0x30/0x538 [cfg80211]
       [&lt;c0059f44&gt;] process_one_work+0x2a0/0x480
       [&lt;c005a4b4&gt;] worker_thread+0x1bc/0x2bc
       [&lt;c0061148&gt;] kthread+0x98/0xa4
       [&lt;c0014af4&gt;] kernel_thread_exit+0x0/0x8

-&gt; #0 (cfg80211_mutex){+.+.+.}:
       [&lt;c008ed58&gt;] print_circular_bug+0x68/0x2cc
       [&lt;c008fb28&gt;] validate_chain+0x978/0x10f0
       [&lt;c0090b68&gt;] __lock_acquire+0x8c8/0x9b0
       [&lt;c0090d40&gt;] lock_acquire+0xf0/0x114
       [&lt;c04734dc&gt;] mutex_lock_nested+0x48/0x320
       [&lt;bf28ae00&gt;] restore_regulatory_settings+0x34/0x418 [cfg80211]
       [&lt;bf28b200&gt;] reg_timeout_work+0x1c/0x20 [cfg80211]
       [&lt;c0059f44&gt;] process_one_work+0x2a0/0x480
       [&lt;c005a4b4&gt;] worker_thread+0x1bc/0x2bc
       [&lt;c0061148&gt;] kthread+0x98/0xa4
       [&lt;c0014af4&gt;] kernel_thread_exit+0x0/0x8

other info that might help us debug this:

Chain exists of:
  cfg80211_mutex --&gt; reg_mutex --&gt; (reg_timeout).work

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock((reg_timeout).work);
                               lock(reg_mutex);
                               lock((reg_timeout).work);
  lock(cfg80211_mutex);

 *** DEADLOCK ***

2 locks held by kworker/0:2/1391:
 #0:  (events){.+.+.+}, at: [&lt;c0059e94&gt;] process_one_work+0x1f0/0x480
 #1:  ((reg_timeout).work){+.+...}, at: [&lt;c0059e94&gt;] process_one_work+0x1f0/0x480

stack backtrace:
[&lt;c001b928&gt;] (unwind_backtrace+0x0/0x12c) from [&lt;c0471d3c&gt;] (dump_stack+0x20/0x24)
[&lt;c0471d3c&gt;] (dump_stack+0x20/0x24) from [&lt;c008ef70&gt;] (print_circular_bug+0x280/0x2cc)
[&lt;c008ef70&gt;] (print_circular_bug+0x280/0x2cc) from [&lt;c008fb28&gt;] (validate_chain+0x978/0x10f0)
[&lt;c008fb28&gt;] (validate_chain+0x978/0x10f0) from [&lt;c0090b68&gt;] (__lock_acquire+0x8c8/0x9b0)
[&lt;c0090b68&gt;] (__lock_acquire+0x8c8/0x9b0) from [&lt;c0090d40&gt;] (lock_acquire+0xf0/0x114)
[&lt;c0090d40&gt;] (lock_acquire+0xf0/0x114) from [&lt;c04734dc&gt;] (mutex_lock_nested+0x48/0x320)
[&lt;c04734dc&gt;] (mutex_lock_nested+0x48/0x320) from [&lt;bf28ae00&gt;] (restore_regulatory_settings+0x34/0x418 [cfg80211])
[&lt;bf28ae00&gt;] (restore_regulatory_settings+0x34/0x418 [cfg80211]) from [&lt;bf28b200&gt;] (reg_timeout_work+0x1c/0x20 [cfg80211])
[&lt;bf28b200&gt;] (reg_timeout_work+0x1c/0x20 [cfg80211]) from [&lt;c0059f44&gt;] (process_one_work+0x2a0/0x480)
[&lt;c0059f44&gt;] (process_one_work+0x2a0/0x480) from [&lt;c005a4b4&gt;] (worker_thread+0x1bc/0x2bc)
[&lt;c005a4b4&gt;] (worker_thread+0x1bc/0x2bc) from [&lt;c0061148&gt;] (kthread+0x98/0xa4)
[&lt;c0061148&gt;] (kthread+0x98/0xa4) from [&lt;c0014af4&gt;] (kernel_thread_exit+0x0/0x8)
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: World regulatory domain updated:
cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

Cc: stable@kernel.org
Signed-off-by: Eliad Peller &lt;eliad@wizery.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>cfg80211: check iface combinations only when iface is running</title>
<updated>2012-06-09T08:31:56Z</updated>
<author>
<name>Michal Kazior</name>
<email>michal.kazior@tieto.com</email>
</author>
<published>2012-06-08T08:55:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f8cdddb8d61d16a156229f0910f7ecfc7a82c003'/>
<id>urn:sha1:f8cdddb8d61d16a156229f0910f7ecfc7a82c003</id>
<content type='text'>
Don't validate interface combinations on a stopped
interface. Otherwise we might end up being able to
create a new interface with a certain type, but
won't be able to change an existing interface
into that type.

This also skips some other functions when
interface is stopped and changing interface type.

Signed-off-by: Michal Kazior &lt;michal.kazior@tieto.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>cfg80211: fix interface combinations check</title>
<updated>2012-06-05T18:27:30Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2012-06-05T10:16:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=463454b5dbd8dbab6e2fc6c557329e5b811b9c32'/>
<id>urn:sha1:463454b5dbd8dbab6e2fc6c557329e5b811b9c32</id>
<content type='text'>
If a given interface combination doesn't contain
a required interface type then we missed checking
that and erroneously allowed it even though iface
type wasn't there at all. Add a check that makes
sure that all interface types are accounted for.

Cc: stable@kernel.org
Reported-by: Mohammed Shafi Shajakhan &lt;mohammed@qca.qualcomm.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>
</entry>
<entry>
<title>cfg80211: use sme_state in ibss start/join path</title>
<updated>2012-06-04T19:21:28Z</updated>
<author>
<name>Amitkumar Karwar</name>
<email>akarwar@marvell.com</email>
</author>
<published>2012-05-29T22:39:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=28f333666ea766fdfb25de3783ff56cd2d1c51f0'/>
<id>urn:sha1:28f333666ea766fdfb25de3783ff56cd2d1c51f0</id>
<content type='text'>
CFG80211_DEV_WARN_ON() at "net/wireless/ibss.c line 63"
is unnecessarily triggered even after successful connection,
when cfg80211_ibss_joined() is called by driver inside
.join_ibss handler.

This patch fixes the problem by changing 'sme_state' in ibss path
and having WARN_ON() check for 'sme_state' similar to infra
association.

Signed-off-by: Amitkumar Karwar &lt;akarwar@marvell.com&gt;
Signed-off-by: Bing Zhao &lt;bzhao@marvell.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next</title>
<updated>2012-05-22T19:18:06Z</updated>
<author>
<name>John W. Linville</name>
<email>linville@tuxdriver.com</email>
</author>
<published>2012-05-22T19:18:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a0d0d1685f9763ab26a394df3ab84026b39a06a7'/>
<id>urn:sha1:a0d0d1685f9763ab26a394df3ab84026b39a06a7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>nl80211: refactor valid channel type check</title>
<updated>2012-05-16T17:08:16Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2012-05-10T19:27:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cd6c65981e72aef9f5cc42ffe64404542162790a'/>
<id>urn:sha1:cd6c65981e72aef9f5cc42ffe64404542162790a</id>
<content type='text'>
There are four instances in nl80211 of getting the
channel type from the attribute and validating it,
refactor those.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>cfg80211: fix cfg80211_can_beacon_sec_chan prototype</title>
<updated>2012-05-16T17:08:15Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2012-05-10T19:25:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=294a20e039a5125b0e88b96e0ee47065ff4e07a5'/>
<id>urn:sha1:294a20e039a5125b0e88b96e0ee47065ff4e07a5</id>
<content type='text'>
It should return bool, not int. The function even
does return true/false.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>nl80211: prevent additions to old station flags API</title>
<updated>2012-05-16T17:08:15Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2012-05-10T18:14:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3383b5a69de59eeef2501834c6e0960b7e2bff28'/>
<id>urn:sha1:3383b5a69de59eeef2501834c6e0960b7e2bff28</id>
<content type='text'>
We don't really want/need to maintain the old
station flags API any more, so refuse changes
to new (not yet defined) flags from the old
flags API.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>cfg80211: add warning when calculating MCS rates &gt;= 32</title>
<updated>2012-05-16T16:46:33Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2012-05-08T19:36:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2615f3759b7b7d47a2fa894bc9f45286bdf122d7'/>
<id>urn:sha1:2615f3759b7b7d47a2fa894bc9f45286bdf122d7</id>
<content type='text'>
cfg80211_calculate_bitrate() doesn't work for MCS
rates 32 or higher, and it has always returned 0
in that case. Warn if it ever really happens.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>cfg80211: remove double prototype</title>
<updated>2012-05-16T16:46:33Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2012-05-08T19:23:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4472037be86a9d7d1cab37e0c4cb310997a140ae'/>
<id>urn:sha1:4472037be86a9d7d1cab37e0c4cb310997a140ae</id>
<content type='text'>
cfg80211_calculate_bitrate() is defined in the external
header file cfg80211.h now, so no need to keep it in
the internal one as well.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
</feed>
