Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2663711pxa; Mon, 17 Aug 2020 15:56:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+rWshtLPquYFzwt1XeSSq3apCLKQzs/FXRmZXZmXn/NumPOI4lMXmRG2oJ6FuYt6I/Udg X-Received: by 2002:a17:906:6004:: with SMTP id o4mr18058104ejj.411.1597704967020; Mon, 17 Aug 2020 15:56:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597704967; cv=none; d=google.com; s=arc-20160816; b=sc6pNQc7ByCxs5Pl96Hh8Loq4xDv1hx9x7j4OFGDTlPBMnnlppp9LtnzfydHu6ImjG MPrPKBaSWN0dYwRd7L6eW+z6ZyGKiHMrR+avuic5/19Po7QACs1W/GvRGS9Cyper6chI UNr97et5lrgf8ondKA9+hxiFjdbVMzqiur8AFb8a0ieSl6mFm/1PFj7o3FNGLzSJIee+ UtoYus4wRr9oy2GqQAQaGGWWEgoFFUm5zqf/dD31T0o6xr968CbsiXl28XsAMT7JBqp/ kS4LDBEg+XKXDjHg4JsyTXOIkyJo+tkNCyobeu1KjcRjhL0E7wQ1Gis8SCMMJM2ZephQ 6i4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rw9NwU+yOnHe2ti3ky1bk/YeZuo/i+cTladm8e5EbRE=; b=wCeUPUVlLuXLnCXuDOYt+mkwDHXbi0mVOFiX5ZCy++9N1lwJGcb5YgpaOuZlYG12hf VlTFhSoOtx5YqD6pNKiWtbF7zrrkEIbXA6YEqgU0r1BjIA6u/vr+tJuD3p0+mco63OCl 61iOZjBhRmXCiTwRsuZO+Vok6F9Gwc0mh9Ra/4mdw9o85yKiz+TH9MRFSN2aoFMFaTEf HKmls5jkZE6YSEp6x75nR73yO5nFL1VtNk4PvibzVnF6O98LPHQnYIXUfUup/TuN41nn yJVyxz4FUWN0RYY+aQHIbckZNLIPqE8c0foCbX+7Vtd5p4Py9ue4I7PF2SNqD/LzikJ8 jrMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=i992kPia; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lt22si12318808ejb.376.2020.08.17.15.55.43; Mon, 17 Aug 2020 15:56:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=i992kPia; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732141AbgHQTmO (ORCPT + 99 others); Mon, 17 Aug 2020 15:42:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:55050 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729649AbgHQPY1 (ORCPT ); Mon, 17 Aug 2020 11:24:27 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 F3F7723719; Mon, 17 Aug 2020 15:24:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597677866; bh=kj5QzK2QJ5tDlUU1DjpaLCU+najP8yUzh2g6eZosa5E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i992kPiar466vW5AhEMQv7ykkZo3pcF9GjP+n++qrIYs4OpIKwhiu+AdeqNCVadtK 8sIy9YhAN7Fh4nf7uDZsLnDUFpad3lXzcUfz/BuUnhtOHDc+LdCqZqvFdbry3dJNC7 +XDpKDD0TL1cn13YrUVvBuFRglqFv8oSLMwDJiZo= 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.8 137/464] io_uring: fix stalled deferred requests Date: Mon, 17 Aug 2020 17:11:30 +0200 Message-Id: <20200817143840.378805823@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143833.737102804@linuxfoundation.org> References: <20200817143833.737102804@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pavel Begunkov [ Upstream commit dd9dfcdf5a603680458f5e7b0d2273c66e5417db ] Always do io_commit_cqring() after completing a request, even if it was accounted as overflowed on the CQ side. Failing to do that may lead to not to pushing deferred requests when needed, and so stalling the whole ring. Signed-off-by: Pavel Begunkov 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 1d8761a9f3b88..1619ca74b44d9 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -7538,6 +7538,7 @@ static void io_uring_cancel_files(struct io_ring_ctx *ctx, } WRITE_ONCE(ctx->rings->cq_overflow, atomic_inc_return(&ctx->cached_cq_overflow)); + io_commit_cqring(ctx); spin_unlock_irq(&ctx->completion_lock); /* -- 2.25.1