Skip to content

Commit

Permalink
Fix sys_poll_x on fedora 40
Browse files Browse the repository at this point in the history
Signed-off-by: albe19029 <103380736+albe19029@users.noreply.github.com>
  • Loading branch information
albe19029 authored and poiana committed Oct 8, 2024
1 parent 2b1e402 commit 973797e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions driver/bpf/fillers.h
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,11 @@ static __always_inline int bpf_poll_parse_fds(struct filler_data *data, bool ent
nfds = bpf_syscall_get_argument(data, 1);
fds = (struct pollfd *)data->tmp_scratch;
read_size = nfds * sizeof(struct pollfd);

val = bpf_syscall_get_argument(data, 0);
if(read_size > SCRATCH_SIZE_MAX) {
return PPM_FAILURE_FRAME_SCRATCH_MAP_FULL;
}

val = bpf_syscall_get_argument(data, 0);
/* We don't want to discard the whole event if the pointer is null.
* Setting `nfds = 0` we will just push to userspace the number of fds read,
* in this case `0`.
Expand Down

0 comments on commit 973797e

Please sign in to comment.