From: Greg Kroah-Hartman Date: Mon, 29 Oct 2012 16:36:07 +0000 (-0700) Subject: 3.0-stable patches X-Git-Tag: v3.0.50~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3c9fa2aa0c4926ab4eb7a07820dbb12ffbb8f5d3;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: arm-at91-i2c-change-id-to-let-i2c-gpio-work.patch bcma-fix-unregistration-of-cores.patch cpufreq-powernow-k8-remove-usage-of-smp_processor_id-in-preemptible-code.patch mac80211-check-if-key-has-tkip-type-before-updating-iv.patch --- diff --git a/queue-3.0/arm-at91-i2c-change-id-to-let-i2c-gpio-work.patch b/queue-3.0/arm-at91-i2c-change-id-to-let-i2c-gpio-work.patch new file mode 100644 index 00000000000..b72f016c7f7 --- /dev/null +++ b/queue-3.0/arm-at91-i2c-change-id-to-let-i2c-gpio-work.patch @@ -0,0 +1,88 @@ +From 7840487cd6298f9f931103b558290d8d98d41c49 Mon Sep 17 00:00:00 2001 +From: Bo Shen +Date: Mon, 15 Oct 2012 17:30:27 +0800 +Subject: ARM: at91/i2c: change id to let i2c-gpio work + +From: Bo Shen + +commit 7840487cd6298f9f931103b558290d8d98d41c49 upstream. + +The i2c core driver will turn the platform device ID to busnum +When using platfrom device ID as -1, it means dynamically assigned +the busnum. When writing code, we need to make sure the busnum, +and call i2c_register_board_info(int busnum, ...) to register device +if using -1, we do not know the value of busnum + +In order to solve this issue, set the platform device ID as a fix number +Here using 0 to match the busnum used in i2c_regsiter_board_info() + +Signed-off-by: Bo Shen +Acked-by: Jean Delvare +Signed-off-by: Nicolas Ferre +Acked-by: Jean-Christophe PLAGNIOL-VILLARD +Acked-by: Ludovic Desroches +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mach-at91/at91rm9200_devices.c | 2 +- + arch/arm/mach-at91/at91sam9260_devices.c | 2 +- + arch/arm/mach-at91/at91sam9261_devices.c | 2 +- + arch/arm/mach-at91/at91sam9263_devices.c | 2 +- + arch/arm/mach-at91/at91sam9rl_devices.c | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +--- a/arch/arm/mach-at91/at91rm9200_devices.c ++++ b/arch/arm/mach-at91/at91rm9200_devices.c +@@ -454,7 +454,7 @@ static struct i2c_gpio_platform_data pda + + static struct platform_device at91rm9200_twi_device = { + .name = "i2c-gpio", +- .id = -1, ++ .id = 0, + .dev.platform_data = &pdata, + }; + +--- a/arch/arm/mach-at91/at91sam9260_devices.c ++++ b/arch/arm/mach-at91/at91sam9260_devices.c +@@ -459,7 +459,7 @@ static struct i2c_gpio_platform_data pda + + static struct platform_device at91sam9260_twi_device = { + .name = "i2c-gpio", +- .id = -1, ++ .id = 0, + .dev.platform_data = &pdata, + }; + +--- a/arch/arm/mach-at91/at91sam9261_devices.c ++++ b/arch/arm/mach-at91/at91sam9261_devices.c +@@ -276,7 +276,7 @@ static struct i2c_gpio_platform_data pda + + static struct platform_device at91sam9261_twi_device = { + .name = "i2c-gpio", +- .id = -1, ++ .id = 0, + .dev.platform_data = &pdata, + }; + +--- a/arch/arm/mach-at91/at91sam9263_devices.c ++++ b/arch/arm/mach-at91/at91sam9263_devices.c +@@ -534,7 +534,7 @@ static struct i2c_gpio_platform_data pda + + static struct platform_device at91sam9263_twi_device = { + .name = "i2c-gpio", +- .id = -1, ++ .id = 0, + .dev.platform_data = &pdata, + }; + +--- a/arch/arm/mach-at91/at91sam9rl_devices.c ++++ b/arch/arm/mach-at91/at91sam9rl_devices.c +@@ -319,7 +319,7 @@ static struct i2c_gpio_platform_data pda + + static struct platform_device at91sam9rl_twi_device = { + .name = "i2c-gpio", +- .id = -1, ++ .id = 0, + .dev.platform_data = &pdata, + }; + diff --git a/queue-3.0/bcma-fix-unregistration-of-cores.patch b/queue-3.0/bcma-fix-unregistration-of-cores.patch new file mode 100644 index 00000000000..0f4643b17fc --- /dev/null +++ b/queue-3.0/bcma-fix-unregistration-of-cores.patch @@ -0,0 +1,37 @@ +From 1fffa905adffbf0d3767fc978ef09afb830275eb Mon Sep 17 00:00:00 2001 +From: Piotr Haber +Date: Thu, 11 Oct 2012 14:05:15 +0200 +Subject: bcma: fix unregistration of cores + +From: Piotr Haber + +commit 1fffa905adffbf0d3767fc978ef09afb830275eb upstream. + +When cores are unregistered, entries +need to be removed from cores list in a safe manner. + +Reported-by: Stanislaw Gruszka +Reviewed-by: Arend Van Spriel +Signed-off-by: Piotr Haber +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/bcma/main.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/bcma/main.c ++++ b/drivers/bcma/main.c +@@ -110,9 +110,10 @@ static int bcma_register_cores(struct bc + + static void bcma_unregister_cores(struct bcma_bus *bus) + { +- struct bcma_device *core; ++ struct bcma_device *core, *tmp; + +- list_for_each_entry(core, &bus->cores, list) { ++ list_for_each_entry_safe(core, tmp, &bus->cores, list) { ++ list_del(&core->list); + if (core->dev_registered) + device_unregister(&core->dev); + } diff --git a/queue-3.0/cpufreq-powernow-k8-remove-usage-of-smp_processor_id-in-preemptible-code.patch b/queue-3.0/cpufreq-powernow-k8-remove-usage-of-smp_processor_id-in-preemptible-code.patch new file mode 100644 index 00000000000..2af80a25922 --- /dev/null +++ b/queue-3.0/cpufreq-powernow-k8-remove-usage-of-smp_processor_id-in-preemptible-code.patch @@ -0,0 +1,60 @@ +From e4df1cbcc1f329e53a1fff7450b2229e0addff20 Mon Sep 17 00:00:00 2001 +From: Andreas Herrmann +Date: Tue, 23 Oct 2012 00:55:10 +0200 +Subject: cpufreq / powernow-k8: Remove usage of smp_processor_id() in preemptible code + +From: Andreas Herrmann + +commit e4df1cbcc1f329e53a1fff7450b2229e0addff20 upstream. + +Commit 6889125b8b4e09c5e53e6ecab3433bed1ce198c9 +(cpufreq/powernow-k8: workqueue user shouldn't migrate the kworker to another CPU) +causes powernow-k8 to trigger a preempt warning, e.g.: + + BUG: using smp_processor_id() in preemptible [00000000] code: cpufreq/3776 + caller is powernowk8_target+0x20/0x49 + Pid: 3776, comm: cpufreq Not tainted 3.6.0 #9 + Call Trace: + [] debug_smp_processor_id+0xc7/0xe0 + [] powernowk8_target+0x20/0x49 + [] __cpufreq_driver_target+0x82/0x8a + [] cpufreq_governor_performance+0x4e/0x54 + [] __cpufreq_governor+0x8c/0xc9 + [] __cpufreq_set_policy+0x1a9/0x21e + [] store_scaling_governor+0x16f/0x19b + [] ? cpufreq_update_policy+0x124/0x124 + [] ? _raw_spin_unlock_irqrestore+0x2c/0x49 + [] store+0x60/0x88 + [] sysfs_write_file+0xf4/0x130 + [] vfs_write+0xb5/0x151 + [] sys_write+0x4a/0x71 + [] system_call_fastpath+0x16/0x1b + +Fix this by by always using work_on_cpu(). + +Signed-off-by: Andreas Herrmann +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/cpufreq/powernow-k8.c | 9 +-------- + 1 file changed, 1 insertion(+), 8 deletions(-) + +--- a/drivers/cpufreq/powernow-k8.c ++++ b/drivers/cpufreq/powernow-k8.c +@@ -1216,14 +1216,7 @@ static int powernowk8_target(struct cpuf + struct powernowk8_target_arg pta = { .pol = pol, .targfreq = targfreq, + .relation = relation }; + +- /* +- * Must run on @pol->cpu. cpufreq core is responsible for ensuring +- * that we're bound to the current CPU and pol->cpu stays online. +- */ +- if (smp_processor_id() == pol->cpu) +- return powernowk8_target_fn(&pta); +- else +- return work_on_cpu(pol->cpu, powernowk8_target_fn, &pta); ++ return work_on_cpu(pol->cpu, powernowk8_target_fn, &pta); + } + + /* Driver entry point to verify the policy and range of frequencies */ diff --git a/queue-3.0/mac80211-check-if-key-has-tkip-type-before-updating-iv.patch b/queue-3.0/mac80211-check-if-key-has-tkip-type-before-updating-iv.patch new file mode 100644 index 00000000000..d387efdef80 --- /dev/null +++ b/queue-3.0/mac80211-check-if-key-has-tkip-type-before-updating-iv.patch @@ -0,0 +1,47 @@ +From 4045f72bcf3c293c7c5932ef001742d8bb5ded76 Mon Sep 17 00:00:00 2001 +From: Stanislaw Gruszka +Date: Tue, 2 Oct 2012 21:34:23 +0200 +Subject: mac80211: check if key has TKIP type before updating IV + +From: Stanislaw Gruszka + +commit 4045f72bcf3c293c7c5932ef001742d8bb5ded76 upstream. + +This patch fix corruption which can manifest itself by following crash +when switching on rfkill switch with rt2x00 driver: +https://bugzilla.redhat.com/attachment.cgi?id=615362 + +Pointer key->u.ccmp.tfm of group key get corrupted in: + +ieee80211_rx_h_michael_mic_verify(): + + /* update IV in key information to be able to detect replays */ + rx->key->u.tkip.rx[rx->security_idx].iv32 = rx->tkip_iv32; + rx->key->u.tkip.rx[rx->security_idx].iv16 = rx->tkip_iv16; + +because rt2x00 always set RX_FLAG_MMIC_STRIPPED, even if key is not TKIP. + +We already check type of the key in different path in +ieee80211_rx_h_michael_mic_verify() function, so adding additional +check here is reasonable. + +Signed-off-by: Stanislaw Gruszka +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + net/mac80211/wpa.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/net/mac80211/wpa.c ++++ b/net/mac80211/wpa.c +@@ -109,7 +109,8 @@ ieee80211_rx_h_michael_mic_verify(struct + if (status->flag & RX_FLAG_MMIC_ERROR) + goto mic_fail; + +- if (!(status->flag & RX_FLAG_IV_STRIPPED) && rx->key) ++ if (!(status->flag & RX_FLAG_IV_STRIPPED) && rx->key && ++ rx->key->conf.cipher == WLAN_CIPHER_SUITE_TKIP) + goto update_iv; + + return RX_CONTINUE; diff --git a/queue-3.0/series b/queue-3.0/series index f6a759b447a..2b8b43d68a3 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -24,3 +24,7 @@ usb-mos7840-remove-null-urb-submission.patch usb-mos7840-remove-invalid-disconnect-handling.patch xhci-fix-potential-null-ptr-deref-in-command-cancellation.patch vhost-fix-mergeable-bufs-on-be-hosts.patch +arm-at91-i2c-change-id-to-let-i2c-gpio-work.patch +mac80211-check-if-key-has-tkip-type-before-updating-iv.patch +bcma-fix-unregistration-of-cores.patch +cpufreq-powernow-k8-remove-usage-of-smp_processor_id-in-preemptible-code.patch