diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2007-05-06 21:50:39 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 19:12:58 (GMT) |
commit | 2af0bc94a665f22975de11bddcf6c57907ce8255 (patch) | |
tree | aa5fb995f34ccdda2b05a0af6380f6aa5814be62 /arch/alpha/kernel/srmcons.c | |
parent | ed58a593dcf6bb9853f711e56f8618f84b7b8cb2 (diff) | |
download | linux-fsl-qoriq-2af0bc94a665f22975de11bddcf6c57907ce8255.tar.xz |
srmcons: fix kmalloc(GFP_KERNEL) inside spinlock
Fixes http://bugzilla.kernel.org/show_bug.cgi?id=8341
Cc: <matthias.kaehlcke@gmail.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/alpha/kernel/srmcons.c')
-rw-r--r-- | arch/alpha/kernel/srmcons.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c index 7569232..85a821a 100644 --- a/arch/alpha/kernel/srmcons.c +++ b/arch/alpha/kernel/srmcons.c @@ -164,9 +164,9 @@ srmcons_get_private_struct(struct srmcons_private **ps) int retval = 0; if (srmconsp == NULL) { + srmconsp = kmalloc(sizeof(*srmconsp), GFP_KERNEL); spin_lock_irqsave(&srmconsp_lock, flags); - srmconsp = kmalloc(sizeof(*srmconsp), GFP_KERNEL); if (srmconsp == NULL) retval = -ENOMEM; else { |