linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zefir Kurtisi <zefir.kurtisi@neratec.com>
To: "Luis R. Rodriguez" <mcgrof@gmail.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/2] compat: fix endless recursion in flush_scheduled_work
Date: Thu, 09 Aug 2012 11:22:32 +0200	[thread overview]
Message-ID: <50238158.2000809@neratec.com> (raw)
In-Reply-To: <CAB=NE6UTm9WyHZX-Ve5TZcKVfWf52caGhBWY_3q9RQuD8KcnZQ@mail.gmail.com>

On 08/06/2012 08:52 PM, Luis R. Rodriguez wrote:
> On Thu, Aug 2, 2012 at 9:28 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>> The hader file defines flush_scheduled_work(a)
>> compat_flush_scheduled_work(a), which causes flush_scheduled_work() and
>> compat_flush_scheduled_work() to be the same function.
>>
>> With this patch it calls the actual function in the kernel.
>>
>> This fixes problems when unloading mac80211 from compat-wireless.
>>
>> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
>> ---
>>  compat/compat-2.6.36.c |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/compat/compat-2.6.36.c b/compat/compat-2.6.36.c
>> index 8f25be0..05b41c2 100644
>> --- a/compat/compat-2.6.36.c
>> +++ b/compat/compat-2.6.36.c
>> @@ -133,6 +133,7 @@ int compat_schedule_delayed_work_on(int cpu,
>>  }
>>  EXPORT_SYMBOL_GPL(compat_schedule_delayed_work_on);
>>
>> +#undef flush_scheduled_work(a)
>>  void compat_flush_scheduled_work(void)
> 
> Hah! Nice. I'll add this and push... Zefir can you see if after
> getting today's compat.git and then by reverting your patch
> 3da0495cf863288b on compat.git if the unloading issues still happens.
> Likely this was the *real* cause, although it is odd to me you ended
> up removing the flush_workqueue() and not the flush_scheduled_work().
> 
>   Luis
> 
Yep, works. Thanks Hauke for the proper fix.

As for why I removed the wrong line, I got the macro mapping wrong,
assuming it ended in calling flush_workqueue() - and chose to remove the
wrong one.

Still curious why it is not crashing with my quick hack, that remained
recursion intact...


Thanks



  reply	other threads:[~2012-08-09  9:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-02 16:28 [PATCH 1/2] compat: remove backport of irq_modify_status Hauke Mehrtens
2012-08-02 16:28 ` [PATCH 2/2] compat: fix endless recursion in flush_scheduled_work Hauke Mehrtens
2012-08-06 18:52   ` Luis R. Rodriguez
2012-08-09  9:22     ` Zefir Kurtisi [this message]
2012-08-09 22:17       ` Luis R. Rodriguez
2012-08-06 18:33 ` [PATCH 1/2] compat: remove backport of irq_modify_status Luis R. Rodriguez
2012-08-06 18:50   ` Hauke Mehrtens
2012-08-06 19:07     ` Luis R. Rodriguez

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=50238158.2000809@neratec.com \
    --to=zefir.kurtisi@neratec.com \
    --cc=hauke@hauke-m.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mcgrof@gmail.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 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).