You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fput() of file rcS might not have completed causing issues when
executing the file.
rcS is opened in do_populate_rootfs before executed. At the end of
do_populate_rootfs() flush_delayed_fput() is called. Now
do_populate_rootfs() assumes that all fput()s caused by
do_populate_rootfs() have completed.
But flush_delayed_fput() can only ensure that fput() on the current
delayed_fput_list has finished. Any file that has been removed from
delayed_fput_list asynchronously in the meantime might not have
completed causing the exec to fail.
do_populate_rootfs delayed_fput_list delayed_fput execve
fput() a
fput() a->b
fput() a->b->rcS
__fput(a)
fput() c
fput() c->d
__fput(b)
flush_delayed_fput
__fput(c)
__fput(d)
__fput(b)
__fput(b) execve(rcS)
Ensure that all delayed work is done by calling flush_delayed_work() in
flush_delayed_fput() explicitly.
Signed-off-by: Chen Lin <[email protected]>
Signed-off-by: Shao Mingyin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Cc: Yang Yang <[email protected]>
Cc: Yang Tao <[email protected]>
Cc: Xu Xin <[email protected]>
[brauner: rewrite commit message]
Signed-off-by: Christian Brauner <[email protected]>
0 commit comments