We restrict the memory allocation to one page, but in two syscalls we were
using the wrong size in the copy_from_user.
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
if (!tp_locvar->fds) \
goto error; \
err = lib_ring_buffer_copy_from_user_check_nofault( \
- tp_locvar->fds, ufds, \
- nfds * sizeof(struct pollfd)); \
+ tp_locvar->fds, ufds, tp_locvar->alloc_fds); \
if (err != 0) \
goto error; \
} \
\
err = lib_ring_buffer_copy_from_user_check_nofault( \
tp_locvar->events, uevents, \
- maxevents * sizeof(struct epoll_event)); \
+ maxalloc * sizeof(struct epoll_event)); \
if (err != 0) \
tp_locvar->fds_length = 0; \
} \