From: Greg Kroah-Hartman Date: Tue, 8 Nov 2011 22:03:04 +0000 (-0800) Subject: 3.1 patches X-Git-Tag: v3.0.9~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=56cd9753d648ce55a02bd0f1be938b30c4615096;p=thirdparty%2Fkernel%2Fstable-queue.git 3.1 patches added patches: crypto-cryptd-use-subsys_initcall-to-prevent-races-with-aesni.patch pm-suspend-off-by-one-in-pm_suspend.patch --- diff --git a/queue-3.1/crypto-cryptd-use-subsys_initcall-to-prevent-races-with-aesni.patch b/queue-3.1/crypto-cryptd-use-subsys_initcall-to-prevent-races-with-aesni.patch new file mode 100644 index 00000000000..6a59081fcae --- /dev/null +++ b/queue-3.1/crypto-cryptd-use-subsys_initcall-to-prevent-races-with-aesni.patch @@ -0,0 +1,34 @@ +From b2bac6acf86d05d8af0499f37d91ecac15722803 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Fri, 19 Aug 2011 16:11:23 +0800 +Subject: crypto: cryptd - Use subsys_initcall to prevent races with aesni + +From: Herbert Xu + +commit b2bac6acf86d05d8af0499f37d91ecac15722803 upstream. + +As cryptd is depeneded on by other algorithms such as aesni-intel, +it needs to be registered before them. When everything is built +as modules, this occurs naturally. However, for this to work when +they are built-in, we need to use subsys_initcall in cryptd. + +Tested-by: Josh Boyer +Signed-off-by: Herbert Xu +Cc: Kerin Millar +Signed-off-by: Greg Kroah-Hartman + +--- + crypto/cryptd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/crypto/cryptd.c ++++ b/crypto/cryptd.c +@@ -945,7 +945,7 @@ static void __exit cryptd_exit(void) + crypto_unregister_template(&cryptd_tmpl); + } + +-module_init(cryptd_init); ++subsys_initcall(cryptd_init); + module_exit(cryptd_exit); + + MODULE_LICENSE("GPL"); diff --git a/queue-3.1/pm-suspend-off-by-one-in-pm_suspend.patch b/queue-3.1/pm-suspend-off-by-one-in-pm_suspend.patch new file mode 100644 index 00000000000..d0fa5be1d11 --- /dev/null +++ b/queue-3.1/pm-suspend-off-by-one-in-pm_suspend.patch @@ -0,0 +1,33 @@ +From 528f7ce6e439edeac38f6b3f8561f1be129b5e91 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Wed, 21 Sep 2011 20:55:04 +0200 +Subject: PM / Suspend: Off by one in pm_suspend() + +From: Dan Carpenter + +commit 528f7ce6e439edeac38f6b3f8561f1be129b5e91 upstream. + +In enter_state() we use "state" as an offset for the pm_states[] +array. The pm_states[] array only has PM_SUSPEND_MAX elements so +this test is off by one. + +Signed-off-by: Dan Carpenter +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + + +--- + kernel/power/suspend.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/power/suspend.c ++++ b/kernel/power/suspend.c +@@ -315,7 +315,7 @@ int enter_state(suspend_state_t state) + */ + int pm_suspend(suspend_state_t state) + { +- if (state > PM_SUSPEND_ON && state <= PM_SUSPEND_MAX) ++ if (state > PM_SUSPEND_ON && state < PM_SUSPEND_MAX) + return enter_state(state); + return -EINVAL; + } diff --git a/queue-3.1/series b/queue-3.1/series index 16ddb983f5b..df35c16e144 100644 --- a/queue-3.1/series +++ b/queue-3.1/series @@ -248,3 +248,5 @@ mtd-mtdchar-add-missing-initializer-on-raw-write.patch mtd-provide-an-alias-for-the-redboot-module-name.patch mtd-pxa3xx_nand-fix-nand-detection-issue.patch mtd-pxa3xx_nand-fix-blank-page-ecc-mismatch.patch +pm-suspend-off-by-one-in-pm_suspend.patch +crypto-cryptd-use-subsys_initcall-to-prevent-races-with-aesni.patch