Skip to content

Commit

Permalink
srmcons: fix kmalloc(GFP_KERNEL) inside spinlock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed May 7, 2007
1 parent ed58a59 commit 2af0bc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/alpha/kernel/srmcons.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2af0bc9

Please sign in to comment.