Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2af0bc94 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds
Browse files

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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ed58a593
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 {