Add patch to fix race between cryptd and aesni (rhbz 721002)

This commit is contained in:
Josh Boyer 2011-08-19 08:48:45 -04:00
commit 449d91f7c4
2 changed files with 32 additions and 1 deletions

View file

@ -0,0 +1,26 @@
commit 9d4c522a113f6caa8b792ae829a25490fa87b1a2
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date: Fri Aug 19 16:11:23 2011 +0800
crypto: cryptd - Use subsys_initcall to prevent races with aesni
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.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
diff --git a/crypto/cryptd.c b/crypto/cryptd.c
index e46d21a..671d4d6 100644
--- 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");

View file

@ -51,7 +51,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be prepended with "0.", so
# for example a 3 here will become 0.3
#
%global baserelease 0
%global baserelease 1
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@ -670,6 +670,7 @@ Patch12016: disable-i8042-check-on-apple-mac.patch
Patch12022: fix-cdc-ncm-dma-stack-vars.patch
Patch12023: ums-realtek-driver-uses-stack-memory-for-DMA.patch
Patch12024: usb-add-quirk-for-logitech-webcams.patch
Patch12025: crypto-register-cryptd-first.patch
# Runtime power management
Patch12203: linux-2.6-usb-pci-autosuspend.patch
@ -1253,6 +1254,7 @@ ApplyPatch add-appleir-usb-driver.patch
ApplyPatch fix-cdc-ncm-dma-stack-vars.patch
ApplyPatch ums-realtek-driver-uses-stack-memory-for-DMA.patch
ApplyPatch usb-add-quirk-for-logitech-webcams.patch
ApplyPatch crypto-register-cryptd-first.patch
# rhbz#605888
ApplyPatch dmar-disable-when-ricoh-multifunction.patch
@ -1893,6 +1895,9 @@ fi
# and build.
%changelog
* Fri Aug 19 2011 Josh Boyer <jwboyer@redhat.com>
- Add patch to fix race between cryptd and aesni (rhbz 721002)
* Wed Aug 17 2011 Dennis Gilmore <dennis@ausil.us>
- add patch to correctly initialise usb on trimslice systems
- build in usb-storage on tegra, internal ssd on trimslice is connected to usb