From patchwork Mon Nov 23 12:23:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 331226 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8D9CC388F9 for ; Mon, 23 Nov 2020 12:52:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4692921D7E for ; Mon, 23 Nov 2020 12:52:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="xut11mWO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387650AbgKWMwj (ORCPT ); Mon, 23 Nov 2020 07:52:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:35978 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387655AbgKWMvw (ORCPT ); Mon, 23 Nov 2020 07:51:52 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C261820657; Mon, 23 Nov 2020 12:51:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606135910; bh=bO7s73SU1jV1FZz1WtVDxuZxz6gE+mYy5u0pALhk+qM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xut11mWOSkMRmXYCLyK5sathRfnTIbKXtKkj7GA1zhhV+LIeYQH+Bb3b2icoEtrmt 9ljHuIQDxrPt8E4nlEgT5q5Kodetkb2CjS6QS4SOS9ROJJ9gVeP5HrpoHUksB/a7sS YMjvwxVWPRAfGS6QPNb1x5v/VwVyS0tiVmnYIIVY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zorro Lang , Jens Axboe Subject: [PATCH 5.9 239/252] io_uring: dont double complete failed reissue request Date: Mon, 23 Nov 2020 13:23:09 +0100 Message-Id: <20201123121847.115040752@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201123121835.580259631@linuxfoundation.org> References: <20201123121835.580259631@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jens Axboe commit c993df5a688975bf9ce899706ca13d2bc8d6be25 upstream. Zorro reports that an xfstest test case is failing, and it turns out that for the reissue path we can potentially issue a double completion on the request for the failure path. There's an issue around the retry as well, but for now, at least just make sure that we handle the error path correctly. Cc: stable@vger.kernel.org Fixes: b63534c41e20 ("io_uring: re-issue block requests that failed because of resources") Reported-by: Zorro Lang Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- fs/io_uring.c | 1 - 1 file changed, 1 deletion(-) --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2359,7 +2359,6 @@ static bool io_resubmit_prep(struct io_k } end_req: req_set_fail_links(req); - io_req_complete(req, ret); return false; } #endif