diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2026-06-04 17:53:26 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2026-06-06 03:28:28 +0000 |
| commit | 5d0ebfe1d97801518755c7025f57ba7d5bf1c8db (patch) | |
| tree | dd3307aba6d46e20412fc752b14d53c10ee3e183 | |
| parent | 3915ffb1c3e04b26d1506bf35d3f665b2e25a915 (diff) | |
renameat(2): when retrying, check for pending signals
The vn_start_write() call there is already interruptible. Check for
user signals before restarting due to ERELOOKUP, or after failed
vn_start_write(). Note that vn_start_write(V_XSLEEP | V_PCATCH)
does not check for signals if not sleeping.
PR: 295826
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57453
| -rw-r--r-- | sys/kern/vfs_syscalls.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 0c4eeb584d41..71d37e08c65b 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -3855,6 +3855,9 @@ again1: vfs_rel(tmp); tmp = NULL; } + error = sig_intr(); + if (error != 0) + return (error); error = vn_start_write(NULL, &mp, V_XSLEEP | V_PCATCH); if (error != 0) return (error); @@ -3937,8 +3940,11 @@ out: out1: if (error == ERESTART) return (0); - if (error == ERELOOKUP) - goto again; + if (error == ERELOOKUP) { + error = sig_intr(); + if (error == 0) + goto again; + } return (error); } |
