mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
generic: test record locks across execve in multithread process
POSIX requires that record locks are preserved across an execve(2). But currently the locks are released if process is multithreaded at the time that execve is called. As Jeff Layton wrote in his patch: " In that case, we'll end up unsharing the files_struct but the locks will still have their fl_owner set to the address of the old one. Eventually, when the other threads die and the last reference to the old files_struct is put, any POSIX locks get torn down since it looks like a close occurred on them. The result is that all of your open files will be intact with none of the locks you held before execve. " Add a new regression test for this particular case. [Eryu: rewrite commit log and test description] Signed-off-by: Xiong Zhou <xzhou@redhat.com> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
@@ -121,6 +121,7 @@
|
||||
/src/t_getcwd
|
||||
/src/t_holes
|
||||
/src/t_immutable
|
||||
/src/t_locks_execve
|
||||
/src/t_mmap_cow_race
|
||||
/src/t_mmap_dio
|
||||
/src/t_mmap_fallocate
|
||||
|
||||
Reference in New Issue
Block a user