On 8/21/20 8:13 PM, Luke Hsiao wrote: > Hi Jens, > > On Fri, Aug 21, 2020 at 7:09 PM Jens Axboe <ax...@kernel.dk> wrote: >> >> On 8/21/20 8:04 PM, Luke Hsiao wrote: >>> >> Sorry, one more minor thing to fix up: >> >>> @@ -4932,6 +4934,11 @@ static bool io_arm_poll_handler(struct io_kiocb *req) >>> mask |= POLLIN | POLLRDNORM; >>> if (def->pollout) >>> mask |= POLLOUT | POLLWRNORM; >>> + >>> + /* If reading from MSG_ERRQUEUE using recvmsg, ignore POLLIN */ >>> + if (req->opcode == IORING_OP_RECVMSG && (sqe->msg_flags & >>> MSG_ERRQUEUE)) >>> + mask &= ~POLLIN; >>> + >> >> Don't pass in the sqe here, but use req->sr_msg.msg_flags for this check. >> This >> is actually really important, as you don't want to re-read anything from the >> sqe. >> >> I'm actually surprised this one got past Jann :-) > > Got it, I will make the change and send v3. In Jann's defense, he > reviewed the previous commit, but not this one :). Thanks for your > detailed feedback.
Ah right you are, I guess it was the previous patch that had his review! Thanks for taking care of this. -- Jens Axboe