From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796379572; b=1OokjslVEirQqKf/M0C/2X0GfZ20mjZ2YTWGJai7Y2ugy+brmGrgtXNwJC8Tnq037rJb 0PJ+N7JccRyoTtmR4YyHvDtzFte0yE+qRnjsrCk4J7Mz0gLkEfCLQz6GJYlEbD8Lxdecu 5e9RLigC9ai6kWO2OjTE9YTdq7pEl/P7QxMTIkW2a5Npqn41LMKowHf3qOapSj5bbyTfF J/PBDyE6M4u+5tWEut/cH9ScJvbqRNwKmINoOk7hva9cFAq3xxITKV1xf0yCu1XaelBW9 0bzpO8JGuccscGuTeRlRZC0nPQ93SRJo+/LDtM9ST2NeikBpBJPTaCZDK+m0oAaCbyw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796379572; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=lpinXIoPsRpmMIS53ytZuhWVEGuf0fs97zKlT6c3dog=; b=vuEPSVJSr8mT4FlUlCDx8tbXTrkD5KO0UqovX8I+mXql7Qm+O5QepG7sjIkOnDe9zIFX QztmC7OJH5qkpgJD8V+oCLQDG2Y5rN5cLhxQswD1HO8UckQ1nQgJQf3yXXJAXUn4kh2TA ou42zcLqfJJ9WpWyfmcN04BU2XlDzOdtgy7pf2gjXCwhuckNzM7LhBveDecfRl8nDAH+b IZ5Fcyh0gXvgt/ulv5g52ip3HIGRYBA6MdFGHY+/2zR2268RSP1f77HOEYU7H78UxWk0x 33ED/8WZbOLcLN6Np3AGZaP0E9heXDfPMOQLn7JKXST1aCvpr7TOvGLwlDlHDSkCk0A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=hnWYIem3; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A68B3606A322; Fri, 4 Dec 2026 10:19:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=hnWYIem3 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 221FE1F000CE; Fri, 4 Dec 2026 10:19:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796379572; bh=lpinXIoPsRpmMIS53ytZuhWVEGuf0fs97zKlT6c3dog=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=hnWYIem30eXWZuAlDyB2vrTo6jYB2qQ2E1Q0oYEHp21Xr8yqWqxS5y/EhXCGCu/eb N19urcvjs5t2CDsdqgZ13qaxx7e7iQV81MfWOPNpqiuZScvdRFs46Q8LoKZYHjtmZD Nqvl3xy8lEI1tJ8agGwJbdGi57YWIrSj2vef1z1w= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yang Xiuwei , Jens Axboe , Sasha Levin Subject: [PATCH 6.1 0020/1059] io_uring/rw: fail soft links on IOPOLL short or error IO Date: Fri, 4 Dec 2026 18:52:31 +0900 Message-ID: <20261204100644.557844837@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yang Xiuwei Commit 4d3db66c5363dcf42c3d43ebaea330ac2d1888bb upstream. io_complete_rw_iopoll() updates cqe.res when the transfer does not match the requested length, but it does not call req_set_fail(). Soft linked requests then still run after a short or failed IOPOLL read or write. Fixes: b66ceaf324b3 ("io_uring: move iopoll reissue into regular IO path") Signed-off-by: Yang Xiuwei Link: https://patch.msgid.link/20261114072246.741950-3-yangxiuwei@kylinos.cn Signed-off-by: Jens Axboe [axboe: 6.1 reissues from inside the res != cqe.res branch, fail the request after the reissue check there] Signed-off-by: Sasha Levin --- io_uring/rw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/io_uring/rw.c b/io_uring/rw.c index 8c38449dd7da0..268f4e923997b 100644 --- a/io_uring/rw.c +++ b/io_uring/rw.c @@ -304,6 +304,7 @@ static void io_complete_rw_iopoll(struct kiocb *kiocb, long res) req->flags |= REQ_F_REISSUE | REQ_F_PARTIAL_IO; return; } + req_set_fail(req); req->cqe.res = res; } -- 2.53.0