aboutsummaryrefslogtreecommitdiff
path: root/drivers/base/firmware_loader/main.c
diff options
context:
space:
mode:
authorKees Cook <[email protected]>2020-10-02 10:38:19 -0700
committerGreg Kroah-Hartman <[email protected]>2020-10-05 13:37:03 +0200
commit885352881f11f1f3113d8eb877786bcb6d720544 (patch)
treeccd23c1c8312552381157d8c8848415aa82901bc /drivers/base/firmware_loader/main.c
parent113eeb517780add2b38932a61d4e4440a73eb72a (diff)
fs/kernel_read_file: Add file_size output argument
In preparation for adding partial read support, add an optional output argument to kernel_read_file*() that reports the file size so callers can reason more easily about their reading progress. Signed-off-by: Kees Cook <[email protected]> Reviewed-by: Mimi Zohar <[email protected]> Reviewed-by: Luis Chamberlain <[email protected]> Reviewed-by: James Morris <[email protected]> Acked-by: Scott Branden <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/base/firmware_loader/main.c')
-rw-r--r--drivers/base/firmware_loader/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c
index 6df1bdcfeb9d..d9a180148c4b 100644
--- a/drivers/base/firmware_loader/main.c
+++ b/drivers/base/firmware_loader/main.c
@@ -500,6 +500,7 @@ fw_get_filesystem_firmware(struct device *device, struct fw_priv *fw_priv,
/* load firmware files from the mount namespace of init */
rc = kernel_read_file_from_path_initns(path, &buffer, msize,
+ NULL,
READING_FIRMWARE);
if (rc < 0) {
if (rc != -ENOENT)