From: Greg Kroah-Hartman Date: Wed, 6 May 2009 16:50:45 +0000 (-0700) Subject: more .29 patches X-Git-Tag: v2.6.27.23~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b5273db4af022a7874e53c30494d9f590c9b1ba9;p=thirdparty%2Fkernel%2Fstable-queue.git more .29 patches --- diff --git a/queue-2.6.29/rndis_wlan-fix-initialization-order-for-workqueue-workers.patch b/queue-2.6.29/rndis_wlan-fix-initialization-order-for-workqueue-workers.patch new file mode 100644 index 00000000000..153c9e383a6 --- /dev/null +++ b/queue-2.6.29/rndis_wlan-fix-initialization-order-for-workqueue-workers.patch @@ -0,0 +1,64 @@ +From e805e4d0b53506dff4255a2792483f094e7fcd2c Mon Sep 17 00:00:00 2001 +From: Jussi Kivilinna +Date: Wed, 22 Apr 2009 10:59:37 +0300 +Subject: rndis_wlan: fix initialization order for workqueue&workers + +From: Jussi Kivilinna + +commit e805e4d0b53506dff4255a2792483f094e7fcd2c upstream. + +rndis_wext_link_change() might be called from rndis_command() at +initialization stage and priv->workqueue/priv->work have not been +initialized yet. This causes invalid opcode at rndis_wext_bind on +some brands of bcm4320. + +Fix by initializing workqueue/workers in rndis_wext_bind() before +rndis_command is used. + +This bug has existed since 2.6.25, reported at: + http://bugzilla.kernel.org/show_bug.cgi?id=12794 + +Signed-off-by: Jussi Kivilinna +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/rndis_wlan.c | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +--- a/drivers/net/wireless/rndis_wlan.c ++++ b/drivers/net/wireless/rndis_wlan.c +@@ -2550,6 +2550,11 @@ static int rndis_wext_bind(struct usbnet + mutex_init(&priv->command_lock); + spin_lock_init(&priv->stats_lock); + ++ /* because rndis_command() sleeps we need to use workqueue */ ++ priv->workqueue = create_singlethread_workqueue("rndis_wlan"); ++ INIT_WORK(&priv->work, rndis_wext_worker); ++ INIT_DELAYED_WORK(&priv->stats_work, rndis_update_wireless_stats); ++ + /* try bind rndis_host */ + retval = generic_rndis_bind(usbdev, intf, FLAG_RNDIS_PHYM_WIRELESS); + if (retval < 0) +@@ -2594,16 +2599,17 @@ static int rndis_wext_bind(struct usbnet + disassociate(usbdev, 1); + netif_carrier_off(usbdev->net); + +- /* because rndis_command() sleeps we need to use workqueue */ +- priv->workqueue = create_singlethread_workqueue("rndis_wlan"); +- INIT_DELAYED_WORK(&priv->stats_work, rndis_update_wireless_stats); + queue_delayed_work(priv->workqueue, &priv->stats_work, + round_jiffies_relative(STATS_UPDATE_JIFFIES)); +- INIT_WORK(&priv->work, rndis_wext_worker); + + return 0; + + fail: ++ cancel_delayed_work_sync(&priv->stats_work); ++ cancel_work_sync(&priv->work); ++ flush_workqueue(priv->workqueue); ++ destroy_workqueue(priv->workqueue); ++ + kfree(priv); + return retval; + } diff --git a/queue-2.6.29/sched-account-system-time-properly.patch b/queue-2.6.29/sched-account-system-time-properly.patch new file mode 100644 index 00000000000..fed71c63124 --- /dev/null +++ b/queue-2.6.29/sched-account-system-time-properly.patch @@ -0,0 +1,55 @@ +From f5f293a4e3d0a0c52cec31de6762c95050156516 Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Wed, 29 Apr 2009 14:44:49 +0200 +Subject: sched: account system time properly + +From: Eric Dumazet + +commit f5f293a4e3d0a0c52cec31de6762c95050156516 upstream. + +Andrew Gallatin reported that IRQ and SOFTIRQ times were +sometime not reported correctly on recent kernels, and even +bisected to commit 457533a7d3402d1d91fbc125c8bd1bd16dcd3cd4 +([PATCH] fix scaled & unscaled cputime accounting) as the first +bad commit. + +Further analysis pointed that commit +79741dd35713ff4f6fd0eafd59fa94e8a4ba922d ([PATCH] idle cputime +accounting) was the real cause of the problem. + +account_process_tick() was not taking into account timer IRQ +interrupting the idle task servicing a hard or soft irq. + +On mostly idle cpu, irqs were thus not accounted and top or +mpstat could tell user/admin that cpu was 100 % idle, 0.00 % +irq, 0.00 % softirq, while it was not. + +[ Impact: fix occasionally incorrect CPU statistics in top/mpstat ] + +Reported-by: Andrew Gallatin +Re-reported-by: Andrew Morton +Signed-off-by: Eric Dumazet +Acked-by: Martin Schwidefsky +Cc: rick.jones2@hp.com +Cc: brice@myri.com +Cc: Paul Mackerras +Cc: Benjamin Herrenschmidt +LKML-Reference: <49F84BC1.7080602@cosmosbay.com> +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/sched.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/sched.c ++++ b/kernel/sched.c +@@ -4347,7 +4347,7 @@ void account_process_tick(struct task_st + + if (user_tick) + account_user_time(p, one_jiffy, one_jiffy_scaled); +- else if (p != rq->idle) ++ else if ((p != rq->idle) || (irq_count() != HARDIRQ_OFFSET)) + account_system_time(p, HARDIRQ_OFFSET, one_jiffy, + one_jiffy_scaled); + else diff --git a/queue-2.6.29/series b/queue-2.6.29/series index 5ac8862397c..67397f6e3de 100644 --- a/queue-2.6.29/series +++ b/queue-2.6.29/series @@ -52,3 +52,6 @@ intel-iommu-avoid-panic-for-drhd-at-address-zero.patch clockevents-prevent-endless-loop-in-tick_handle_periodic.patch ignore-madvise-for-hugetlbfs-backed-regions.patch committed_as-for-2.6.29.2.patch +rndis_wlan-fix-initialization-order-for-workqueue-workers.patch +sched-account-system-time-properly.patch +tracing-x86-mmiotrace-fix-range-test.patch diff --git a/queue-2.6.29/tracing-x86-mmiotrace-fix-range-test.patch b/queue-2.6.29/tracing-x86-mmiotrace-fix-range-test.patch new file mode 100644 index 00000000000..7b56d0081c3 --- /dev/null +++ b/queue-2.6.29/tracing-x86-mmiotrace-fix-range-test.patch @@ -0,0 +1,36 @@ +From 33015c85995716d03f6293346cf05a1908b0fb9a Mon Sep 17 00:00:00 2001 +From: Stuart Bennett +Date: Tue, 28 Apr 2009 20:17:48 +0100 +Subject: tracing: x86, mmiotrace: fix range test + +From: Stuart Bennett + +commit 33015c85995716d03f6293346cf05a1908b0fb9a upstream. + +Matching on (addr == (p->addr + p->len)) causes problems when mappings +are adjacent. + +[ Impact: fix mmiotrace confusion on adjacent iomaps ] + +Signed-off-by: Stuart Bennett +Acked-by: Pekka Paalanen +Cc: Steven Rostedt +LKML-Reference: <1240946271-7083-2-git-send-email-stuart@freedesktop.org> +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/mm/kmmio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/mm/kmmio.c ++++ b/arch/x86/mm/kmmio.c +@@ -87,7 +87,7 @@ static struct kmmio_probe *get_kmmio_pro + { + struct kmmio_probe *p; + list_for_each_entry_rcu(p, &kmmio_probes, list) { +- if (addr >= p->addr && addr <= (p->addr + p->len)) ++ if (addr >= p->addr && addr < (p->addr + p->len)) + return p; + } + return NULL;