summaryrefslogtreecommitdiffstats
path: root/fs/efivarfs/file.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-26 15:39:01 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-26 15:39:01 +0100
commit134d1fd44221614d7de994d07ef92a6111952e1c (patch)
tree5d6e5db31b5a9d2483388624820e6ca053d87cfa /fs/efivarfs/file.c
parentUSB: chaoskey: Use kasprintf() over strcpy()/strcat() (diff)
parentLinux 4.16-rc3 (diff)
downloadlinux-134d1fd44221614d7de994d07ef92a6111952e1c.tar.xz
linux-134d1fd44221614d7de994d07ef92a6111952e1c.zip
Merge 4.16-rc3 into usb-next
We want the USB fixes in here. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/efivarfs/file.c')
-rw-r--r--fs/efivarfs/file.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/efivarfs/file.c b/fs/efivarfs/file.c
index 5f22e74bbade..8e568428c88b 100644
--- a/fs/efivarfs/file.c
+++ b/fs/efivarfs/file.c
@@ -8,6 +8,7 @@
*/
#include <linux/efi.h>
+#include <linux/delay.h>
#include <linux/fs.h>
#include <linux/slab.h>
#include <linux/mount.h>
@@ -74,6 +75,11 @@ 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;
+ }
+
err = efivar_entry_size(var, &datasize);
/*