Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2907766iog; Mon, 27 Jun 2022 05:32:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s4aBj0H6dSmkLy2lHyXsPCgitAnyz2M6yjXDZX+TtLIbXZle236/e2tWrYz6C/Jg8vghJ6 X-Received: by 2002:a17:906:79ca:b0:705:111f:12dc with SMTP id m10-20020a17090679ca00b00705111f12dcmr12216008ejo.602.1656333151851; Mon, 27 Jun 2022 05:32:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656333151; cv=none; d=google.com; s=arc-20160816; b=HtR/PwDPAxZxJhVOhfzOMOSdo6/DzKRacwMNP1V9Y3dpsRe3rODs65esceVHdHFZVR 54vfvPRRig7dYPchZxKyuwVrbiS0qpi+YuNDfZkmo0ZmsR7gTvTAUuVR+XLGGPr8/nRX +ecx9MROqOnB6adIxWa4qNetyEzahFwKkSPLIT7FYkxrcawy8hWGEqsIKniTQ6ipMVR+ 9/EYnh32kbCPYTFxtnbAvAdE3b0AxPGi68U4Q9BjEft0hxY80+LJIBnF3kuqlD+RzOox Mtx2+Stm66w2K+7yt9NcdlzX9tx5iFcWf9Fz0EswWLCjp+eqcPOIAaMse85qLMqoKGcM xkmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jl2jqOJ9VlMmKNdxfA3vOwqTQbaZq9L0UbycZZHt1GM=; b=GJH0AM9Oqot6iQPf8chKiA3Hk/swyk8NA0e/a97lP1vgRE1NpyD1/laOFsQVpMdh/h 36RxmJetBoe6t4nrXpnqcj+nugYkQ0wvlwIfHIMAcEjveuBgzVw9B5qVhN7ZtlTlfiIJ 7LtiM/tmG/l8agr02jprI94IAAsn3DFOq6AweycJl0SREkR0EvjAuhAjbu0NeawxrLOB S7svo0fSfhWp7DDY0F8KuFV3XSucwtxqdjLtyThWl3mvmJqoLVI8KEvY8DsUTyji+S8B 7GncmJw+V+9VmoEeWplOrNeSgG+y2C8EdOUYtTMc8luIxvPuP0dqEpCXf3OQ83hzgWBO 7aJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PXLLadvB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w16-20020a056402269000b004359b77f70csi14110950edd.16.2022.06.27.05.32.06; Mon, 27 Jun 2022 05:32:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PXLLadvB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239337AbiF0L4i (ORCPT + 99 others); Mon, 27 Jun 2022 07:56:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237711AbiF0Ls7 (ORCPT ); Mon, 27 Jun 2022 07:48:59 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C48FD7B; Mon, 27 Jun 2022 04:43:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3BCCFB80D37; Mon, 27 Jun 2022 11:43:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 904A6C3411D; Mon, 27 Jun 2022 11:42:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656330179; bh=wbR3MEKdW6BKJKVYfURMA437j2DqDri/6fTczRaIwwU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PXLLadvB20Uyv6YobbX+qQ/a6kw85rwpOpzHIrYwM2/+QXEWbhdhTkj4APndmP3QO +HMCotfiLio7lhvh1a232kkDBwygSHtBYswf+wvPxk0p5U/Fvu/bIqNTk7Afqhee0u eRTXfTY2/xW8CMlVVqvrhfFoELBhFm6rjlr1C3Cg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pavel Begunkov , Jens Axboe , Sasha Levin Subject: [PATCH 5.18 111/181] io_uring: fix wrong arm_poll error handling Date: Mon, 27 Jun 2022 13:21:24 +0200 Message-Id: <20220627111947.917086865@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627111944.553492442@linuxfoundation.org> References: <20220627111944.553492442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pavel Begunkov [ Upstream commit 9d2ad2947a53abf5e5e6527a9eeed50a3a4cbc72 ] Leaving ip.error set when a request was punted to task_work execution is problematic, don't forget to clear it. Fixes: aa43477b04025 ("io_uring: poll rework") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/a6c84ef4182c6962380aebe11b35bdcb25b0ccfb.1655852245.git.asml.silence@gmail.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- fs/io_uring.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/io_uring.c b/fs/io_uring.c index 38ecea726254..e4186635aaa8 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -6178,6 +6178,7 @@ static int __io_arm_poll_handler(struct io_kiocb *req, if (unlikely(ipt->error || !ipt->nr_entries)) { poll->events |= EPOLLONESHOT; req->apoll_events |= EPOLLONESHOT; + ipt->error = 0; } __io_poll_execute(req, mask, poll->events); return 0; -- 2.35.1