diff mbox

[1/3] cfg80211: allow reprocessing of pending requests

Message ID 1387486399-4053-2-git-send-email-mcgrof@do-not-panic.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Luis R. Rodriguez Dec. 19, 2013, 8:53 p.m. UTC
This addresses the RCU component of allowing us to reprocess
the last regulatory request.

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
---
 net/wireless/reg.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

Comments

Johannes Berg Jan. 7, 2014, 3:34 p.m. UTC | #1
On Thu, 2013-12-19 at 12:53 -0800, Luis R. Rodriguez wrote:
> This addresses the RCU component of allowing us to reprocess
> the last regulatory request.

That commit message makes very little sense to me.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sander Eikelenboom Jan. 23, 2014, 1:16 p.m. UTC | #2
Tuesday, January 7, 2014, 4:34:09 PM, you wrote:

> On Thu, 2013-12-19 at 12:53 -0800, Luis R. Rodriguez wrote:
>> This addresses the RCU component of allowing us to reprocess
>> the last regulatory request.

> That commit message makes very little sense to me.

> johannes

Hi Luis,

It seems i haven't seen any response from you regarding this
patch series ? (could have been i missed it, i'm not subscribed to linux-wireless)

 --
 Sander

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Luis R. Rodriguez Jan. 24, 2014, 11:14 p.m. UTC | #3
On Thu, Jan 23, 2014 at 5:16 AM, Sander Eikelenboom
<linux@eikelenboom.it> wrote:
>
> Tuesday, January 7, 2014, 4:34:09 PM, you wrote:
>
>> On Thu, 2013-12-19 at 12:53 -0800, Luis R. Rodriguez wrote:
>>> This addresses the RCU component of allowing us to reprocess
>>> the last regulatory request.
>
>> That commit message makes very little sense to me.
>
>> johannes
>
> Hi Luis,
>
> It seems i haven't seen any response from you regarding this
> patch series ? (could have been i missed it, i'm not subscribed to linux-wireless)

I quit my job, went on vacation and during vacation lost my phone and
the ChromeBook PIxel [0] I bought and had installed my own OS on
decided to poop out thanks to the stupidity behind Google's policy on
a half assed developer mode on that thing. In summary I have been
ramping up a development environment, ramping up on a new job, have no
802.11 hardware to even test any alternative I come up with so -- I
think this will take a bit of time, but am starting to get at least a
development environment going again. Hope to look at this by next
week.

[0] https://plus.google.com/101487746899672598413/posts/9rS6qvGU8Q1

  Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sander Eikelenboom Jan. 27, 2014, 10:48 a.m. UTC | #4
Saturday, January 25, 2014, 12:14:37 AM, you wrote:

> On Thu, Jan 23, 2014 at 5:16 AM, Sander Eikelenboom
> <linux@eikelenboom.it> wrote:
>>
>> Tuesday, January 7, 2014, 4:34:09 PM, you wrote:
>>
>>> On Thu, 2013-12-19 at 12:53 -0800, Luis R. Rodriguez wrote:
>>>> This addresses the RCU component of allowing us to reprocess
>>>> the last regulatory request.
>>
>>> That commit message makes very little sense to me.
>>
>>> johannes
>>
>> Hi Luis,
>>
>> It seems i haven't seen any response from you regarding this
>> patch series ? (could have been i missed it, i'm not subscribed to linux-wireless)

> I quit my job, went on vacation and during vacation lost my phone and
> the ChromeBook PIxel [0] I bought and had installed my own OS on
> decided to poop out thanks to the stupidity behind Google's policy on
> a half assed developer mode on that thing. In summary I have been
> ramping up a development environment, ramping up on a new job, have no
> 802.11 hardware to even test any alternative I come up with so -- I
> think this will take a bit of time, but am starting to get at least a
> development environment going again. Hope to look at this by next
> week.

NP, good luck with getting everything back together,
I was just wondering if it was still on someone's todo :-)


> [0] https://plus.google.com/101487746899672598413/posts/9rS6qvGU8Q1

>   Luis


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Luis R. Rodriguez Feb. 19, 2014, 12:51 a.m. UTC | #5
On Tue, Jan 7, 2014 at 7:34 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Thu, 2013-12-19 at 12:53 -0800, Luis R. Rodriguez wrote:
>> This addresses the RCU component of allowing us to reprocess
>> the last regulatory request.
>
> That commit message makes very little sense to me.

Yeah sorry about that, it was a run-on sentence following the subject,
specifically it addressed the issue observed when trying to reprocess
the last regulatory request. I'll send something more coherent.

  Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 9b897fc..5be2d7c 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -244,19 +244,21 @@  static char user_alpha2[2];
 module_param(ieee80211_regdom, charp, 0444);
 MODULE_PARM_DESC(ieee80211_regdom, "IEEE 802.11 regulatory domain code");
 
-static void reg_kfree_last_request(void)
+static void reg_kfree_last_request(struct regulatory_request *lr)
 {
-	struct regulatory_request *lr;
-
-	lr = get_last_request();
-
 	if (lr != &core_request_world && lr)
 		kfree_rcu(lr, rcu_head);
 }
 
 static void reg_update_last_request(struct regulatory_request *request)
 {
-	reg_kfree_last_request();
+	struct regulatory_request *lr;
+
+	lr = get_last_request();
+	if (lr == request)
+		return;
+
+	reg_kfree_last_request(lr);
 	rcu_assign_pointer(last_request, request);
 }