diff options
author | David S. Miller <davem@davemloft.net> | 2018-02-24 08:04:20 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-24 08:04:20 +0300 |
commit | f74290fdb363665538743d14c4f00aeacdb68d87 (patch) | |
tree | a5c8f6332f06550e935d1e557ac927302f7f63c4 /fs/efivarfs/file.c | |
parent | 1b71af6053af1bd2f849e9fda4f71c1e3f145dcf (diff) | |
parent | 9cb9c07d6b0c5fd97d83b8ab14d7e308ba4b612f (diff) | |
download | linux-f74290fdb363665538743d14c4f00aeacdb68d87.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'fs/efivarfs/file.c')
-rw-r--r-- | fs/efivarfs/file.c | 6 |
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); /* |