diff mbox

compat: fix system crash on 2.6.35 when flushing work

Message ID 1342168714-3361-1-git-send-email-zefir.kurtisi@neratec.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Zefir Kurtisi July 13, 2012, 8:38 a.m. UTC
Ubuntu 10.10 stock kernel (2.6.35-22-generic) crashes in
compat_flush_scheduled_work(), that is called e.g. when
mac80211 module is unloaded.

The problem was introduced with 80bf8a83
compat: backport system work queues system_wq and system_long_wq

The crash happens in compat_flush_scheduled_work() where both
flush_workqueue() and flush_scheduled_work() are called successively.
Removing one of them resolves the issue.

All compat-wireless tarballs after 2012-03-18 are affected.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
---
 compat/compat-2.6.36.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Comments

Luis R. Rodriguez July 18, 2012, 3:24 p.m. UTC | #1
On Fri, Jul 13, 2012 at 1:38 AM, Zefir Kurtisi
<zefir.kurtisi@neratec.com> wrote:
> Ubuntu 10.10 stock kernel (2.6.35-22-generic) crashes in
> compat_flush_scheduled_work(), that is called e.g. when
> mac80211 module is unloaded.
>
> The problem was introduced with 80bf8a83
> compat: backport system work queues system_wq and system_long_wq
>
> The crash happens in compat_flush_scheduled_work() where both
> flush_workqueue() and flush_scheduled_work() are called successively.
> Removing one of them resolves the issue.
>
> All compat-wireless tarballs after 2012-03-18 are affected.
>
> Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>

Thanks! Applied and pushed and I'll roll this into the stable series
as well and make a new set of releases where this is applicable today.

  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
C. McPherson Aug. 12, 2012, 4:19 p.m. UTC | #2
Zefir:
Thanks a lot for this reference. All my systems are running Ubuntu 
10.04/10.10. I was updating our compat-wireless with the stable 
compat-wireless 3.5
and came across this crash in our testing lab. I added your patch and 
the stable compat-wireless 3.5 is now working with our Ubuntu.

-Tex


On 07/13/2012 04:38 AM, Zefir Kurtisi wrote:
> Ubuntu 10.10 stock kernel (2.6.35-22-generic) crashes in
> compat_flush_scheduled_work(), that is called e.g. when
> mac80211 module is unloaded.
>
> The problem was introduced with 80bf8a83
> compat: backport system work queues system_wq and system_long_wq
>
> The crash happens in compat_flush_scheduled_work() where both
> flush_workqueue() and flush_scheduled_work() are called successively.
> Removing one of them resolves the issue.
>
> All compat-wireless tarballs after 2012-03-18 are affected.
>
> Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
> ---
>   compat/compat-2.6.36.c |    1 -
>   1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/compat/compat-2.6.36.c b/compat/compat-2.6.36.c
> index 9190ecd..8f25be0 100644
> --- a/compat/compat-2.6.36.c
> +++ b/compat/compat-2.6.36.c
> @@ -140,7 +140,6 @@ void compat_flush_scheduled_work(void)
>   	 * go with the old kernel's one first for now (keventd_wq) and
>   	 * if think its reasonable later we can flip this around.
>   	 */
> -	flush_workqueue(system_wq);
>   	flush_scheduled_work();
>   }
>   EXPORT_SYMBOL_GPL(compat_flush_scheduled_work);

--
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
Zefir Kurtisi Aug. 13, 2012, 11:15 a.m. UTC | #3
On 08/12/2012 06:19 PM, C. McPherson wrote:
> Zefir:
> Thanks a lot for this reference. All my systems are running Ubuntu
> 10.04/10.10. I was updating our compat-wireless with the stable
> compat-wireless 3.5
> and came across this crash in our testing lab. I added your patch and
> the stable compat-wireless 3.5 is now working with our Ubuntu.
> 
> -Tex
> 
> 
Hi Tex,

the fix Hauke provided is the correct one. The QH I posted was a lucky
punch that for some reason prevented the system crashing without
resolving the issue.


--
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/compat/compat-2.6.36.c b/compat/compat-2.6.36.c
index 9190ecd..8f25be0 100644
--- a/compat/compat-2.6.36.c
+++ b/compat/compat-2.6.36.c
@@ -140,7 +140,6 @@  void compat_flush_scheduled_work(void)
 	 * go with the old kernel's one first for now (keventd_wq) and
 	 * if think its reasonable later we can flip this around.
 	 */
-	flush_workqueue(system_wq);
 	flush_scheduled_work();
 }
 EXPORT_SYMBOL_GPL(compat_flush_scheduled_work);