From: Saurabh Sengar <saurabh.truth@gmail.com>
To: matt@codeblueprint.co.uk, linux-efi@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Saurabh Sengar <saurabh.truth@gmail.com>
Subject: [PATCH] efi: replace GFP_KERNEL with GFP_ATOMIC
Date: Wed, 28 Oct 2015 00:12:29 +0530 [thread overview]
Message-ID: <1445971349-3322-1-git-send-email-saurabh.truth@gmail.com> (raw)
In-Reply-To: <saurabh.truth@gmail.com>
replace GFP_KERNEL with GFP_ATOMIC, as code while holding a spinlock
should be atomic
GFP_KERNEL may sleep and can cause deadlock, where as GFP_ATOMIC may
fail but certainly avoids deadlock
Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
---
drivers/firmware/efi/vars.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/efi/vars.c b/drivers/firmware/efi/vars.c
index 70a0fb1..c07de85 100644
--- a/drivers/firmware/efi/vars.c
+++ b/drivers/firmware/efi/vars.c
@@ -334,7 +334,7 @@ static void dup_variable_bug(efi_char16_t *str16, efi_guid_t *vendor_guid,
*/
efivar_wq_enabled = false;
- str8 = kzalloc(len8, GFP_KERNEL);
+ str8 = kzalloc(len8, GFP_ATOMIC);
if (!str8)
return;
--
1.9.1
next reply other threads:[~2015-10-27 18:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 18:42 Saurabh Sengar [this message]
2015-11-03 16:36 [PATCH v2] " Matt Fleming
2015-11-03 17:38 ` [PATCH] " Saurabh Sengar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1445971349-3322-1-git-send-email-saurabh.truth@gmail.com \
--to=saurabh.truth@gmail.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@codeblueprint.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome