Message ID | 20220621153623.3786960-2-ardb@kernel.org |
---|---|
State | New |
Headers | show |
Series | efi: Restructure EFI varstore driver | expand |
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c index 14658b009f1b..b62eead3f801 100644 --- a/fs/pstore/inode.c +++ b/fs/pstore/inode.c @@ -349,7 +349,7 @@ int pstore_mkfile(struct dentry *root, struct pstore_record *record) int rc = 0; char name[PSTORE_NAMELEN]; struct pstore_private *private, *pos; - size_t size = record->size + record->ecc_notice_size; + size_t size = record->size; if (WARN_ON(!inode_is_locked(d_inode(root)))) return -EINVAL;
If a pstore record has its ecc_notice_size field set to >0, it means the record's buffer has that many additional bytes appended to the end that carry backend specific metadata, typically used for error correction. Given that this is backend specific, and that user space cannot really make sense of this metadata anyway, let's not expose it via the pstore filesystem. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> --- fs/pstore/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)