kernel/fd: Create the SyscallRestartWrapper before calling common_vector_io.
Otherwise, it seems compiler will optimize the assign operation into a call of the first constructor, meaning the thread's syscall flag won't be set properly. Fixes #18951.
This commit is contained in:
@@ -855,8 +855,8 @@ common_user_vector_io(int fd, off_t pos, const iovec* userVecs, size_t count,
|
||||
if (error != B_OK)
|
||||
return error;
|
||||
|
||||
SyscallRestartWrapper<ssize_t> result = common_vector_io(fd, pos,
|
||||
vecs, count, write, false);
|
||||
SyscallRestartWrapper<ssize_t> result;
|
||||
result = common_vector_io(fd, pos, vecs, count, write, false);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user