mirror of
https://github.com/openharmony/third_party_liburing.git
synced 2026-07-20 22:58:41 -04:00
fix io_uring_recvmsg_cmsg_nexthdr logic
io_uring_recvmsg_cmsg_nexthdr was using the payload to delineate the end
of the cmsg list, but really it needs to use whatever was returned by the
kernel.
Reported-and-tested-by: Jens Axboe <axboe@kernel.dk>
Fixes: df4f819eaf ("add multishot recvmsg API")
Signed-off-by: Dylan Yudaken <dylany@fb.com>
Link: https://lore.kernel.org/r/20220718133429.726628-1-dylany@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
0b350e9af9
commit
1eecbb527d
@@ -745,7 +745,8 @@ io_uring_recvmsg_cmsg_nexthdr(struct io_uring_recvmsg_out *o, struct msghdr *m,
|
||||
|
||||
if (cmsg->cmsg_len < sizeof(struct cmsghdr))
|
||||
return NULL;
|
||||
end = (unsigned char *) io_uring_recvmsg_payload(o, m);
|
||||
end = (unsigned char *) io_uring_recvmsg_cmsg_firsthdr(o, m) +
|
||||
o->controllen;
|
||||
cmsg = (struct cmsghdr *)((unsigned char *) cmsg +
|
||||
CMSG_ALIGN(cmsg->cmsg_len));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user