From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B106AC43334 for ; Wed, 15 Jun 2022 08:05:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236288AbiFOIFq (ORCPT ); Wed, 15 Jun 2022 04:05:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236586AbiFOIFp (ORCPT ); Wed, 15 Jun 2022 04:05:45 -0400 Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F30DB45ACA for ; Wed, 15 Jun 2022 01:05:44 -0700 (PDT) Message-ID: <1e54cb98-23dd-d092-c0b9-937462a9418f@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1655280343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UIr7RHhCObo8VPaR/DNbXkf1XAngu4kwygxwxBjB8+M=; b=MfPdVk2lQw2r/CpMXnrtO3Iz4ROaDOcThz8HzLhKJovzXCSZAvvlXU6HJ1Sgk0ArDRpPke yBFogzRvknV7ry4rfK6quwtOywHGYEy/DtxfuhJUQ49pMiuW3/NRM4gPKoGEwDGVeJGPXt fcGmlODDY/2NZfLiFiKMnIMcaMLoQhk= Date: Wed, 15 Jun 2022 16:05:31 +0800 MIME-Version: 1.0 Subject: Re: [PATCH for-next v2 09/25] io_uring: never defer-complete multi-apoll Content-Language: en-US To: Pavel Begunkov , io-uring@vger.kernel.org Cc: Jens Axboe References: <9ce557af28d199cb03cd24db65fad6579a2e9c2b.1655213915.git.asml.silence@gmail.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Hao Xu In-Reply-To: <9ce557af28d199cb03cd24db65fad6579a2e9c2b.1655213915.git.asml.silence@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On 6/14/22 22:36, Pavel Begunkov wrote: > Luckily, nnobody completes multi-apoll requests outside the polling > functions, but don't set IO_URING_F_COMPLETE_DEFER in any case as > there is nobody who is catching REQ_F_COMPLETE_INLINE, and so will leak > requests if used. > > Signed-off-by: Pavel Begunkov > --- > io_uring/io_uring.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c > index d895f70977b0..1fb93fdcfbab 100644 > --- a/io_uring/io_uring.c > +++ b/io_uring/io_uring.c > @@ -2149,7 +2149,7 @@ int io_poll_issue(struct io_kiocb *req, bool *locked) > io_tw_lock(req->ctx, locked); > if (unlikely(req->task->flags & PF_EXITING)) > return -EFAULT; > - return io_issue_sqe(req, IO_URING_F_NONBLOCK|IO_URING_F_COMPLETE_DEFER); > + return io_issue_sqe(req, IO_URING_F_NONBLOCK); > } > > struct io_wq_work *io_wq_free_work(struct io_wq_work *work) Good catch! Thanks.