mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-28 20:11:00 +01:00
kern: poll: tap out the pollfd array on successful return
We do this in kern_poll() to include freebsd32 but exclude the linux compat layer. The ABI should be the same, but the POLL constants are probably different or should be assumed so. Reviewed by: bapt, jhb Differential Revision: https://reviews.freebsd.org/D44158
This commit is contained in:
parent
291079d0eb
commit
b5d2165b90
@ -1606,6 +1606,11 @@ kern_poll(struct thread *td, struct pollfd *ufds, u_int nfds,
|
||||
error = kern_poll_kfds(td, kfds, nfds, tsp, set);
|
||||
if (error == 0)
|
||||
error = pollout(td, kfds, ufds, nfds);
|
||||
#ifdef KTRACE
|
||||
if (error == 0 && KTRPOINT(td, KTR_STRUCT_ARRAY))
|
||||
ktrstructarray("pollfd", UIO_USERSPACE, ufds, nfds,
|
||||
sizeof(*ufds));
|
||||
#endif
|
||||
|
||||
out:
|
||||
if (nfds > nitems(stackfds))
|
||||
|
Loading…
Reference in New Issue
Block a user