From nobody Sat Feb 7 21:08:15 2026 Received: from mail-07.mail-europe.com (mail-0701.mail-europe.com [51.83.17.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50E1B265606 for ; Tue, 30 Dec 2025 19:09:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=51.83.17.38 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767121776; cv=none; b=lVZ+yndFqvHst7IfcD6++g7qY3mQtD7DyTrZAXNzSSbGbtKbrwXuevytM/OJ0pvYV8dUWa+LqUmU3euavIKETBpU/df/jxHIdnsWMMchQXcLstVjl51oelaoI+TSbd3vyPWrP+ZEG2oDACilKO71D9fMf3e4U773F6pu5kTqN7U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767121776; c=relaxed/simple; bh=pWkEjd4hMv/fHafqF4xTd3Kc0gtTkmxazpyQfrtR1rw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HUA8j00tc9edP80cfYivKC5ZWzoFDEKEhGIAMFno6G2qjL8zIXlbTRJRDAox5DqHDznjBNv0BJ1aP+OseQvXJyYfekk/7bgelPw7qCgjq+VvyM2Sw3RSLQV7rjA0Hez0n9OTIf6nZnoX+LopycN70MQCx77vyZ6G5J/BUm+GtBY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=negrel.dev; spf=fail smtp.mailfrom=negrel.dev; dkim=pass (2048-bit key) header.d=negrel.dev header.i=@negrel.dev header.b=sZVUDE0Q; arc=none smtp.client-ip=51.83.17.38 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=negrel.dev Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=negrel.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=negrel.dev header.i=@negrel.dev header.b="sZVUDE0Q" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=negrel.dev; s=protonmail3; t=1767121764; x=1767380964; bh=pZWKjWAe65pI5LtNsDuI7lxtSjKpyVfINRRefbhTB1k=; h=From:To:Cc:Subject:Date:Message-ID:From:To:Cc:Date:Subject: Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=sZVUDE0QrjaVOXVO8Xg/OGMEBzIGfXe5gwTKlKIgQ2Y914+g1tH3zmbsuI4j/X5fz TL0NK4CY5hULHjL27PzRRd8J/nh4AgYZISSS/OhGZY3BIe+n7628kxcai71ZS42tNq PAzvigMk+TxTZVGNrdM/jzRaawOJxUXutAwNscVIXoFba9KfBhpIcuRczdeJ5W6n/C qOVnFT0FmYMEFXyd6uDARz92UtU78p2Zj7G63wrj7A3ADlhavNmVyxPcSoXB+eSJcn X4hWi3XX+NwtVQffNKFDlw/wmJRpXVqhawD9ia3vFOL4FkQ5NhrBBmTy1B0fFeSohD Sl/djmdNOHgMw== X-Pm-Submission-Id: 4dgjLp5kBkz2Scqd From: Alexandre Negrel To: axboe@kernel.dk, io-uring@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Alexandre Negrel Subject: [PATCH v2] io_uring: drop overflowing CQE instead of exceeding memory limits Date: Tue, 30 Dec 2025 19:57:28 +0100 Message-ID: <20251230190909.557152-1-alexandre@negrel.dev> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Allocate the overflowing CQE with GFP_NOWAIT instead of GFP_ATOMIC. This changes causes allocations to fail in out-of-memory situations, resulting in CQE being dropped. Using GFP_ATOMIC allows a process to exceed memory limits. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=3D220794 Signed-off-by: Alexandre Negrel --- io_uring/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 6cb24cdf8e68..709943fedaf4 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -864,7 +864,7 @@ static __cold bool io_cqe_overflow_locked(struct io_rin= g_ctx *ctx, { struct io_overflow_cqe *ocqe; =20 - ocqe =3D io_alloc_ocqe(ctx, cqe, big_cqe, GFP_ATOMIC); + ocqe =3D io_alloc_ocqe(ctx, cqe, big_cqe, GFP_NOWAIT); return io_cqring_add_overflow(ctx, ocqe); } =20 --=20 2.51.0