diff options
author | Amir Goldstein <[email protected]> | 2023-05-24 18:48:25 +0300 |
---|---|---|
committer | Jan Kara <[email protected]> | 2023-05-25 13:17:04 +0200 |
commit | 7cdafe6cc4a6ee94c56a5c96d6edd80d066d5a3b (patch) | |
tree | f1e0b02718ede6480fc58517d9a8e38f8edc71a7 /lib/test_fortify/write_overflow-strcpy.c | |
parent | a95aef69a740f5a1c7d70f2b58552207edaef99a (diff) |
exportfs: check for error return value from exportfs_encode_*()
The exportfs_encode_*() helpers call the filesystem ->encode_fh()
method which returns a signed int.
All the in-tree implementations of ->encode_fh() return a positive
integer and FILEID_INVALID (255) for error.
Fortify the callers for possible future ->encode_fh() implementation
that will return a negative error value.
name_to_handle_at() would propagate the returned error to the users
if filesystem ->encode_fh() method returns an error.
Reported-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/linux-fsdevel/[email protected]/
Signed-off-by: Amir Goldstein <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Message-Id: <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strcpy.c')
0 files changed, 0 insertions, 0 deletions