Skip to content

Commit 9cf16b3

Browse files
committed
fsconfig: ensure that dirfd is set to aux
The code in fs_param_is_fd() expects param->dirfd to be set to the fd that was used to set param->file to initialize result->uint_32. So make sure it's set so users like autofs using FSCONFIG_SET_FD with the new mount api can rely on this to be set to the correct value. Link: https://lore.kernel.org/lkml/20230922-vorbringen-spaghetti-946729122076@brauner Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent dede367 commit 9cf16b3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/fsopen.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ SYSCALL_DEFINE5(fsconfig,
465465
param.file = fget(aux);
466466
if (!param.file)
467467
goto out_key;
468+
param.dirfd = aux;
468469
break;
469470
default:
470471
break;

0 commit comments

Comments
 (0)