From: "tip-bot2 for Tony Luck" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Lennart Poettering <mzxreary@0pointer.de>,
Tony Luck <tony.luck@intel.com>, Ard Biesheuvel <ardb@kernel.org>,
x86 <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: [tip: efi/urgent] efivarfs: Don't return -EINTR when rate-limiting reads
Date: Fri, 19 Jun 2020 16:46:00 -0000 [thread overview]
Message-ID: <159258516047.16989.672955452800449351.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20200528194905.690-3-tony.luck@intel.com>
The following commit has been merged into the efi/urgent branch of tip:
Commit-ID: 4353f03317fd3eb0bd803b61bdb287b68736a728
Gitweb: https://git.kernel.org/tip/4353f03317fd3eb0bd803b61bdb287b68736a728
Author: Tony Luck <tony.luck@intel.com>
AuthorDate: Thu, 28 May 2020 12:49:05 -07:00
Committer: Ard Biesheuvel <ardb@kernel.org>
CommitterDate: Mon, 15 Jun 2020 14:38:56 +02:00
efivarfs: Don't return -EINTR when rate-limiting reads
Applications that read EFI variables may see a return
value of -EINTR if they exceed the rate limit and a
signal delivery is attempted while the process is sleeping.
This is quite surprising to the application, which probably
doesn't have code to handle it.
Change the interruptible sleep to a non-interruptible one.
Reported-by: Lennart Poettering <mzxreary@0pointer.de>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/r/20200528194905.690-3-tony.luck@intel.com
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
fs/efivarfs/file.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/efivarfs/file.c b/fs/efivarfs/file.c
index 4b8bc45..feaa5e1 100644
--- a/fs/efivarfs/file.c
+++ b/fs/efivarfs/file.c
@@ -73,10 +73,8 @@ static ssize_t efivarfs_file_read(struct file *file, char __user *userbuf,
ssize_t size = 0;
int err;
- while (!__ratelimit(&file->f_cred->user->ratelimit)) {
- if (!msleep_interruptible(50))
- return -EINTR;
- }
+ while (!__ratelimit(&file->f_cred->user->ratelimit))
+ msleep(50);
err = efivar_entry_size(var, &datasize);
next prev parent reply other threads:[~2020-06-19 16:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-28 19:49 [PATCH 0/2] Couple of efivarfs fixes Tony Luck
2020-05-28 19:49 ` [PATCH 1/2] efivarfs: Update inode modification time for successful writes Tony Luck
2020-06-19 16:46 ` [tip: efi/urgent] " tip-bot2 for Tony Luck
2020-05-28 19:49 ` [PATCH 2/2] efivarfs: Don't return -EINTR when rate-limiting reads Tony Luck
2020-06-19 16:46 ` tip-bot2 for Tony Luck [this message]
2020-06-15 9:50 ` [PATCH 0/2] Couple of efivarfs fixes Ard Biesheuvel
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=159258516047.16989.672955452800449351.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=ardb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mzxreary@0pointer.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®