From: Luis R. Rodriguez Date: Tue, 7 Aug 2012 06:23:31 +0000 (-0700) Subject: compat: revert 3da0495c compat_flush_scheduled_work "fix" X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d192c4b99f9f8afca003fbad3d86d3c28906db2b;p=openwrt%2Fstaging%2Fblogic.git compat: revert 3da0495c compat_flush_scheduled_work "fix" This revert: commit 3da0495cf863288b6798e121ccf93c4453c6c768 Author: Zefir Kurtisi Date: Fri Jul 13 10:38:34 2012 +0200 compat: fix system crash on 2.6.35 when flushing work 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 Signed-off-by: Luis R. Rodriguez Turns out the real issue was the recursive call to compat_flush_scheduled_work(). Signed-off-by: Luis R. Rodriguez --- diff --git a/compat/compat-2.6.36.c b/compat/compat-2.6.36.c index 51486b0c0a0c..72ada4a4c57d 100644 --- a/compat/compat-2.6.36.c +++ b/compat/compat-2.6.36.c @@ -141,6 +141,7 @@ 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);