Kernel: Avoid an allocation in sys$poll

This commit is contained in:
Gunnar Beutner 2021-05-14 09:39:08 +02:00 committed by Andreas Kling
parent 277f333b2b
commit 7dc77bd833
Notes: sideshowbarker 2024-07-18 17:45:35 +09:00

View File

@ -150,7 +150,7 @@ KResultOr<int> Process::sys$poll(Userspace<const Syscall::SC_poll_params*> user_
if (params.sigmask && !copy_from_user(&sigmask, params.sigmask))
return EFAULT;
Vector<pollfd> fds_copy;
Vector<pollfd, FD_SETSIZE> fds_copy;
if (params.nfds > 0) {
Checked nfds_checked = sizeof(pollfd);
nfds_checked *= params.nfds;