Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2658052pxa; Mon, 17 Aug 2020 15:44:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBgkozQT6MzhvEMcjL1NJ4HBF20H7PJnLLM/MHIYYu3vHjz+s9GzuvI0qYvuX/yIvvwww4 X-Received: by 2002:a17:906:fa0b:: with SMTP id lo11mr17948406ejb.235.1597704280314; Mon, 17 Aug 2020 15:44:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597704280; cv=none; d=google.com; s=arc-20160816; b=E6u0j5NzoOOORAEtboECsOJn9dVWw/8mT3IBL5P+FMuo/GbzfzOdIJovy3z3b/ZTp1 La0j3Zr7VDRz0Uu1j576ogSE8Y6wFSsVQmm9AsVe6SVNxD+u27jrn6Hip+n9w2QCn+EU 9rpNX1WY4mNtdixVSWHnMuA2aFjQqi9c68SuB2ypAiNj6kvvwO4aKMiWOC42Y80L/+w8 Qrr092UvD0eSjK9LDvtp5Zmiw0BArMQ5uHzPzhgSCtl37Gls+3cKxUNlrm4B8dcCvr9u ifDOvUUzGVofxkteQkNca9H7crBaPr/ft6NIMVYxkYyLYKganBqHwRXd5CAazxXW0AcE CIHg== 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=u6KOp3+OVN4OsCHhFhMJJfmRuSJMGRb0EZVq5T+DxM0=; b=vxXaM0A06XVU+aqp+IrQZoFWI6t9xgecBizFptBiDBS4kSUFQXPTD2FsowVY0y51FZ t8b5GvsNz0eAdVhCX4iEO+Licnk5pCWif96sEwypjZ2Emmr/qQANIclYbwPGziahsd2N XsRSQ2dtECBAkXx/Sm7f3maGBw599Yxg2/+y67N4FxcAHQBKWt+6TJn1kabPJv0rsQca I7S/0kHmK74lprunOuDwY4b5/IXlU4IEl/HZZkUW6E4y+302M/7MC5AiLwiH0MAjX9iU dtnA0Ia6dinz5NJuvT3VPHeFTONOh5M9K/RtkCyyM518joPrNOqvq+6VowSGGFLhzu2x 6GLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XJtR7Kwu; 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 lo6si12024044ejb.584.2020.08.17.15.44.17; Mon, 17 Aug 2020 15:44:40 -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=XJtR7Kwu; 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 S2391955AbgHQTEC (ORCPT + 99 others); Mon, 17 Aug 2020 15:04:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:57896 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730792AbgHQPqQ (ORCPT ); Mon, 17 Aug 2020 11:46:16 -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 AD0EA2065D; Mon, 17 Aug 2020 15:46:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597679172; bh=j1ZFhY5yPwchj58hGcRxDu3F9DG3gz9cojapMFGgyV0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XJtR7KwuRwXiqd28Wja14/6YxCwaGRAhg6TU51dDgUW2q1xtqT5i6GAagKwJRzzHI YsZj7J3Mij+xm7CSIUvmM/0EbyaOAsBe3mj3nbblGuTxnRc2SBoTewyI/aRKK2yZvj kCTWIk+p6EChJeA8tNSZeEIxFaGIWlPBLsqDNCAA= 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.7 119/393] io_uring: fix stalled deferred requests Date: Mon, 17 Aug 2020 17:12:49 +0200 Message-Id: <20200817143825.387573280@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143819.579311991@linuxfoundation.org> References: <20200817143819.579311991@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 c212af69c15b4..06a093da872f8 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -7581,6 +7581,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