diff options
author | Christian Brauner <brauner@kernel.org> | 2024-01-12 11:09:14 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-01-13 15:06:25 +0300 |
commit | ba5afb9a84df2e6b26a1b6389b98849cd16ea757 (patch) | |
tree | 5829dd309fc8910ff586e6fda90b07d09ca9962f /include | |
parent | 7ea26f9460c6c76b1d6e36f39fce34b16cb88300 (diff) | |
download | linux-ba5afb9a84df2e6b26a1b6389b98849cd16ea757.tar.xz |
fs: rework listmount() implementation
Linus pointed out that there's error handling and naming issues in the
that we should rewrite:
* Perform the access checks for the buffer before actually doing any
work instead of doing it during the iteration.
* Rename the arguments to listmount() and do_listmount() to clarify what
the arguments are used for.
* Get rid of the pointless ctr variable and overflow checking.
* Get rid of the pointless speculation check.
Link: https://lore.kernel.org/r/CAHk-=wjh6Cypo8WC-McXgSzCaou3UXccxB+7PVeSuGR8AjCphg@mail.gmail.com
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/syscalls.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 5c0dbef55792..cdba4d0c6d4a 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -414,7 +414,7 @@ asmlinkage long sys_statmount(const struct mnt_id_req __user *req, struct statmount __user *buf, size_t bufsize, unsigned int flags); asmlinkage long sys_listmount(const struct mnt_id_req __user *req, - u64 __user *buf, size_t bufsize, + u64 __user *mnt_ids, size_t nr_mnt_ids, unsigned int flags); asmlinkage long sys_truncate(const char __user *path, long length); asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length); |