From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) (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 B707B3AC0F1 for ; Mon, 23 Mar 2026 13:37:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774273050; cv=none; b=NzSbw0Jh2rftSCnGG/KVgPbwAcki1KCrTeqo1AGc8IG6VmjdvIUPdwZo31zEtir/mdtT7OzQlVDxPyTbHpTj//uybPHAR4VNv+ZNmRezH5EmBbx0TaAn8j+/vyj4Si3ofnuP/qAlD2O4ph2/m1c58n7/EmlsS3tCUp7EcC7bOew= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774273050; c=relaxed/simple; bh=cuqf5WKEOeSBvl5nCWR95sghaIdZAB/uyQOlk0lWsBg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=i2ArRS031x3Ujrr0DrmgUr7Syx15mEVy66lH49UCD/VUj3FSF+Je4zCIi1xT7xR901utjGUDg0fMANVniJtxl4Wb3wBLmkrNxDHVn+DBg8EIZiYkZYgn4g4zQJEbnjTVfduGaaVCRL5YxMbTMDqkMf1M0wQCimPGg8rU+51pKj0= 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=GuoJJeKo; arc=none smtp.client-ip=209.85.210.50 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="GuoJJeKo" Received: by mail-ot1-f50.google.com with SMTP id 46e09a7af769-7d7e5e8c907so2261356a34.0 for ; Mon, 23 Mar 2026 06:37:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1774273045; x=1774877845; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Jr0xfFxyDLcn1eSxu2mPqEreGtCiMmN42izltshk9hE=; b=GuoJJeKoRGTMpbffh6cfLal7modHZRLYB3Oy5bCZCcbW1t4Rj/yzA8nIQh//NJIdCk PSWc7+IlkhjcA+mj7cUkATZt1RYEIcQD+leVjaW7nCjZazp3jVTs/3rH6KwM/iE9st3K /lc2grCjzw2PPRmUJFmKLTky8QzNMcn1uIhl91uRSTXitpWX3Z0LYMHyif+A+dxGxaiy Y/RjCvGAtOm+gGCBBsUpaEmu8lFusQQeQuTox95+9+Pnh4Z7bUIeRKYjcoN2Sk6HmlY2 2CMRM2xsZCBk1/XGOrvP03S9F/mc0QWXGIh2e4DAol0iJmub2GFQgT6ZZnI87NpFQ6xm oAVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774273045; x=1774877845; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Jr0xfFxyDLcn1eSxu2mPqEreGtCiMmN42izltshk9hE=; b=k2oV6+S49gYEslX3U6WnpaQBpFvt1tP5rHp/gVkpRqEHUCF1TmY6P/h/hIPx4lLBSz LFqFEhW/gUX6p2P30s3/HkNhZgG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:fec1 with SMTP id 46e09a7af769-7d7f7011e61mr6635086a34.32.1774273045411; Mon, 23 Mar 2026 06:37:25 -0700 (PDT) Received: from [192.168.1.150] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7d7eadfc678sm9323570a34.19.2026.03.23.06.37.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Mar 2026 06:37:24 -0700 (PDT) Message-ID: Date: Mon, 23 Mar 2026 07:37:24 -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: [PATCH 5.15.y] io_uring/tctx: work around xa_store() allocation error issue To: Robert Garcia , stable@vger.kernel.org Cc: Pavel Begunkov , io-uring@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260323081930.899697-1-rob_garcia@163.com> Content-Language: en-US From: Jens Axboe In-Reply-To: <20260323081930.899697-1-rob_garcia@163.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/23/26 2:19 AM, Robert Garcia wrote: > From: Jens Axboe > > [ Upstream commit 7eb75ce7527129d7f1fee6951566af409a37a1c4 ] > > syzbot triggered the following WARN_ON: > > WARNING: CPU: 0 PID: 16 at io_uring/tctx.c:51 __io_uring_free+0xfa/0x140 io_uring/tctx.c:51 > > which is the > > WARN_ON_ONCE(!xa_empty(&tctx->xa)); > > sanity check in __io_uring_free() when a io_uring_task is going through > its final put. The syzbot test case includes injecting memory allocation > failures, and it very much looks like xa_store() can fail one of its > memory allocations and end up with ->head being non-NULL even though no > entries exist in the xarray. > > Until this issue gets sorted out, work around it by attempting to > iterate entries in our xarray, and WARN_ON_ONCE() if one is found. > > Reported-by: syzbot+cc36d44ec9f368e443d3@syzkaller.appspotmail.com > Link: https://lore.kernel.org/io-uring/673c1643.050a0220.87769.0066.GAE@google.com/ > Signed-off-by: Jens Axboe > [ Modify the function in io_uring.c because it's located here in v5.15. ] > Signed-off-by: Robert Garcia I'm find adding this to 5.15 stable. However, this also need to go to 5.10-stable then as the io_uring bases are identical. Greg, when you queue this up, please add to both. Thanks! -- Jens Axboe