From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f175.google.com (mail-il1-f175.google.com [209.85.166.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FAA547A6B for ; Tue, 28 Oct 2025 01:09:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761613754; cv=none; b=QAVaYOwuf/4llq5djThnON/JhBXx95piWaM9D7NbQHGHbal02Zzvn+JYtfi7A6PVZMdWwNW3lRQjGYiqEMZke4+gVFhsf1WN+0gnPd2yPfi5cHTClnAdoWgLw0V/YPuxGjKIL3KixEcXVZn4sF1qoYfQYCwM3pS6iUuXTMmjRE8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761613754; c=relaxed/simple; bh=pUm9xiCUI/xrjdBKVyej6cYWAqpapE1zoQBQ7lE+3zI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=sOOdIFYTTwTeTBPL8h1RU+v/hOAuA6O4smCTLfo+zJiCcZg11OdIc4KmEod8qMpa3FzHXjqLoV3ZyfVW6vnMJjQaLFMkx+a2dK3Pgydd3jSwWHmzsfNGQrAoTe7CtHZ6Ax8EUQq5HkG+PTfssZ4szxvuxNq9uOSmW/OQGG0z1/U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b=YqWCnzOo; arc=none smtp.client-ip=209.85.166.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b="YqWCnzOo" Received: by mail-il1-f175.google.com with SMTP id e9e14a558f8ab-430b45ba0e4so26793465ab.1 for ; Mon, 27 Oct 2025 18:09:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1761613751; x=1762218551; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=rciq0fMfQg5ykRHdo5BOaqx85Gr9r9nCGAwh1wrJfPw=; b=YqWCnzOoSWXBeN5aZRIbxHyK2QZ54P8+XL1Zg2rM/42Fte3WoPWAbkSRmaJ5nBwApk hDq3Xtz9q0oPWXwzvz4VuRi1uADRz2bOTyMLLEnmk0KLPhIbjiatHVjLgzuTEwQr65iJ taDfDehFEBkkiPVb8OYlKsL0NMhF+vNnOWUJ8cCDzBAUQbJKPDc/DLfHXsj4ITQcXmFm 5uKQH00hYHfVMseTtqvVJq3qfbBL+6NKWx0ggvbqqONglO0IjukJtBZhW/wq09Ryy3/J td5rdp/k0yPfwLeaYeLXl4nHgg8X6iBuupBk0mv3vpbkI0dX2EixcqhNH8K1zhBxEM+B 06Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761613751; x=1762218551; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rciq0fMfQg5ykRHdo5BOaqx85Gr9r9nCGAwh1wrJfPw=; b=rHN9ArIQwqiQOlgmy+yCmTJXekw0p08OhwBnmcXWWZWBz0zwY/PgRutp4Xs8QaJ33+ nMhquewB+DMLZm2GUrNNn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by 2002:a05:6e02:1848:b0:42f:9847:15bd with SMTP id e9e14a558f8ab-4320f860164mr25853825ab.26.1761613751385; Mon, 27 Oct 2025 18:09:11 -0700 (PDT) Received: from [192.168.1.150] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-431f67ea857sm36647365ab.10.2025.10.27.18.09.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Oct 2025 18:09:10 -0700 (PDT) Message-ID: Date: Mon, 27 Oct 2025 19:09:08 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [syzbot] [io-uring?] INFO: task hung in io_uring_del_tctx_node (5) To: Keith Busch Cc: syzbot , io-uring@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com References: <68ffdf18.050a0220.3344a1.039e.GAE@google.com> From: Jens Axboe Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 10/27/25 6:03 PM, Keith Busch wrote: > On Mon, Oct 27, 2025 at 05:15:56PM -0600, Jens Axboe wrote: >>>> leaves fdinfo open up to being broken. Before, we had: >>>> >>>> sq_entries = min(sq_tail - sq_head, ctx->sq_entries); >>>> >>>> as a cap for the loop, now you just have: >>>> >>>> while (sq_head < sq_tail) { >>>> >>>> which seems like a bad idea. It's also missing an sq_head increment if >>>> we hit this condition: >>> >>> This would have to mean the application did an invalid head ring-wrap, >>> right? >> >> Right, it's a malicious use case. But you always have to be able to deal >> with those, it's not like broken hardware in that sense. >> >>> Regardless, I messed up and the wrong thing will happen here in >>> that case as well as the one you mentioned. >> >> Yep I think so too, was more interested in your opinion on the patch :-) > > Yeah, patch looks good. Thanks for checking! I'll send it out. > I plowed through this thinking the mixed CQE > showed the way, but didn't appreciate the subtle differences on the > submission side. Ah right, yes on the CQ side the kernel controls it as the producer. No such risk there. -- Jens Axboe