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=1796379497; b=gLdhBp9i3BZ6qGkmLhoQ3MECVV/aWxvCLMS/iMH0Bc6zYkNn+OKKmF7bQr5UFUPtX6Ti z9MNKojStKUrf5XC6zrryGhtl5MUzY3UlyuM5Sgvrc6zWapAEHl6iLu9zm91AYlp5gNFI ewMoe3vseFA04CQZleTvlrJNV+ZTEDNLdNVeyMLZsKkRIJEEQ+OsRB45RZCNOFgpPSfCX 19H6WhK8hgRHH7cKSIoWeRAu2PaDyTjb/Kl1zLB7NOhAy+1ZsRCwDOzGKntEq2R/HYec/ uIHfJvfJqTQw12I+EG+MeT2P17BFOat/fLDo2PezNP6WLzKBfyYvztjBtXwcXBifVyQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796379497; 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=w/S2phMsDCniGgCxPRBpKjm0Eu2WaLk/Sr4ZsOFtp8c=; b=vcEwlqnFyNiWa04pEhatX1Z9fju+fp2zmLVkX8NYz9Q2W7EOv4IDI0vD1aR2JPl8gWVt Jijy2tBLMnF96GcMZtOl3BSqSuOdf6vFXfcr9P2ZrWSljBJfteVUoggFZBm5blWK3Ea18 D+oALif+K/J+Omm8D5z4+iQCilFob+cCeJ+MCTAAU9xk3V795tnEpf9PALJKDrBMYXKGG YV8fexMrhUWJstlGqeNhABVnBYFQdcaVaax6/DEp4Jbwv56HTKbNO1afqWlo7GFGZ+9Ot dA1F1yY/U8Be+8XGRjm4mQyOi6mzNa4jhorLhaj6aWw3uFLEM8eu+B56C7h3/9tHuIA== 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=Ee27neVf; 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 D64F2606A32C; Fri, 4 Dec 2026 10:18:17 +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=Ee27neVf Received: by smtp.kernel.org (Postfix) with ESMTPSA id 498D41F000CE; Fri, 4 Dec 2026 10:18:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796379497; bh=w/S2phMsDCniGgCxPRBpKjm0Eu2WaLk/Sr4ZsOFtp8c=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Ee27neVfSd2iUidUKyc1JjGCjuKvjiNHAw/Q04PPiVouixMMD8dk7/XttjJNshUjZ ltgX6R2lR+Bubh/H04rPXoNt8XlFwGdoytApiVPz63cAiu3upOqjkOHQzERCPSerF8 7FD9kCKsj/orJn2DF2EwVlRjxZurbsa3uLgqxYiI= 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.6 0018/1167] io_uring/rw: fail soft links on IOPOLL short or error IO Date: Fri, 4 Dec 2026 18:50:45 +0900 Message-ID: <20261204100702.520739070@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-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.6 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 102f92dce6721..ec8e719a93864 100644 --- a/io_uring/rw.c +++ b/io_uring/rw.c @@ -318,6 +318,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