From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (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 D83C63DCD9C for ; Wed, 8 Jul 2026 06:34:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783492468; cv=none; b=VUpAN5Qdi1mohEr1Ev79+BFcn2dBR8r9cE95qNVCyEOZ7y/XJJ7Bdk8deXn9btWLStE34Hn8TXspQu8dh7C+dGAM+cwGGEdEZzMd5NhyXtdU/lF8uS7duVnDPDZdTuMEo8TwD0RYD59Y5wUCGPx58Gaf9zX43N5i8ejP27WrtYo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783492468; c=relaxed/simple; bh=LT0B1dhU1NRKbZdY/SDRVDGianQnqntWCIrMYKlQik4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TL8MSuQoTTVm9wS05eSxg7SEhHi5OnHD2o5ktO+GKw0hw3E/yrcUVfNYgB5lu7kMrpwWWWkr3DzXPk8SKLKJvvWJWTI8XZlBJYptnzkxXqBCg0A1HazV4GlbQT7bA+AKgCsJXt/0bF6DVzIBWelPVQ9KEpqT2F2ofsFPpeUMe1k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gA+XJxuL; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gA+XJxuL" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-2cc891373e0so3156885ad.2 for ; Tue, 07 Jul 2026 23:34:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783492466; x=1784097266; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=qijf+Q/iz6Hk/taKo9zjQrhkXJ3vlM7+8IeyvqN/Bro=; b=gA+XJxuLIUkAsBvOPdfMg/W0VTu1vfAsX7PFnVvpWnhEQPAu1Olv2aTx6HwhEX3QUR x5CEyzbt7xc+9WlTk/DB3kHBi+M8irUmqsbzkbsETn63Ppi7s9fkjVMAusziPX5i/dkq 308+A0tFHLgy0E6q1jWwsz4BPbOPumSZmEAgTfnHTHcQVOGvnAIOxlBYqBwk7e/uwVNN 6q2AlOBz/FWp+qeZZeTcg37/oJYy4jDmseytP0JFI+/IWKbSrqjsF9kiTrap8QtbaUfA h3j4yuo6zlO6z2lkxPR10PJEO3lDtAtO2trCq985xwxdKamlqBABTd/kZUGkZmCAWzjt rHAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783492466; x=1784097266; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=qijf+Q/iz6Hk/taKo9zjQrhkXJ3vlM7+8IeyvqN/Bro=; b=VdyFXLbb43LuLksB0zApHvtlReVfgYfuGjrtrpWwmUy7E4T2O7PhyLC/+wfixmI7u1 3WTRoyi+il925EUBBHNV/TTq+geQ6gRLlE7rlsTUL9QHMpxH025FMT0wlJ530tpv2xjD CQ4BaCSF1SF/v4205/SmN2f97qKMLzTOPgGAW92CTqDZVAvRFyFEjJmAZe28PH0dXVwz svfIKy76euJvBWp96xFysbnOosrt91MmZ70Vxeo6Bh2N5t+cpgxOdxmQFCo49IlHs8J4 HOX7NdloX1a3AlZlLJkvCI9pAYA5/tEUlATmJKxQR3twCEFHeuB/cJGGPmYiuc55rt4M mwjQ== X-Forwarded-Encrypted: i=1; AHgh+RqrB4bxAD5m0fW+dTRAF3MBLcm5ZqwBjSpjhguxo7ZXwikelSf4+IcT4qHwKCYPu/q2JvNshjx3cqxoDYU=@vger.kernel.org X-Gm-Message-State: AOJu0Yy0/B4q828xdqaPx3FaAtIWQ3vrAMLNAwIM272pV1cU5xJtw2wJ D+4hyTgtaXIYYsR5MMlPr35HARkhP0Gwyh6QcvDuTnhEuJTd73zTTpsr X-Gm-Gg: AfdE7cm3ti5LP+SxsI3EzHlEfSU4PkVCB6ZREgOxeqM0ObwV8Njr6k+sKPn7cilWZXP sqZUPoY63e22+yh0kV5dypjbV8VK5b8NCFjzw0Ajhlx/TbMwbVRofEFd7UQtj/zs9B8yM6+IhA1 j9KcDJk3MG/exyn60m0B7KNluOKIXJHHpw68jx6qTTh+eDLtZp436KIZNtMYC4PJ284JBSOOO+0 cqJZgWbmTo4W7EJeIBe1hQTOP/gOQuwIY6Z+DdSCSuYqoaC7KHq64vRK73vGr3HuGscv+FlHOlQ YjjxJRtfnIGFuQQFDEXBX0g/sNP84QXlL3dNdjbgtgn4x//ms6uavnUu+ceU5G3hlJvdy0Iyeut N1mt7tQbDvaTDeGyhe2M5cHO5+Yo6MKIrbUu+imMqb+YTTXmwI7yEYa6xpT/xKxGhI5okjKkWVQ UuQfkVUvA= X-Received: by 2002:a17:902:cf09:b0:2ca:6d87:e684 with SMTP id d9443c01a7336-2ccea488100mr10566585ad.32.1783492466094; Tue, 07 Jul 2026 23:34:26 -0700 (PDT) Received: from ubuntu.. ([61.144.108.37]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ccdf808379sm10187935ad.48.2026.07.07.23.34.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2026 23:34:25 -0700 (PDT) From: Jing Wu To: jirislaby@kernel.org Cc: gregkh@linuxfoundation.org, avorontsov@ru.mvista.com, alan@redhat.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, wangzhaolong@fnnas.com Subject: Re: [PATCH v6] serial: 8250: fix use-after-free in IRQ chain handling Date: Wed, 8 Jul 2026 14:34:19 +0800 Message-ID: <20260708063420.3332316-1-realwujing@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <0ede8499-abe2-41d3-bb0c-095c02c5b699@kernel.org> References: <20260707-bug-221579-8250-shared-irq-race-v6-1-f8c499a90bdd@gmail.com> <0ede8499-abe2-41d3-bb0c-095c02c5b699@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Qiliang Yuan On Wed, Jul 08, 2026 at 08:03:55AM +0200, Jiri Slaby wrote: > Ah, now I see you are fixing the same thing as: > https://lore.kernel.org/all/20260708031115.3757150-1-wangzhaolong@fnnas.com/ > > I did not look up who of you was first. > > Looks like he reported and apparently tries to fix that too ;). You were > obviously CCed, talk to them and don't send two patches for the same issue. Wang reported Bugzilla #221579 and sent an initial patch on May 27. I sent my v1 the next day (May 28), and have iterated with Wang's review input across v1..v6 — the timeline shows Wang's v2 (Jul 8) was written after and based on the direction of our v5/v6 series: v1: May 28, Qiliang [PATCH] serial: 8250: fix use-after-free in IRQ chain handling v3: May 29, Wang confirmed "v3 fixes the Bugzilla reproducer on my setup." v5: Jun 24, Qiliang [PATCH v5] (with manual locking) v6: Jul 7, Qiliang [PATCH v6] (back to guard style) v2: Jul 8, Wang [PATCH v2] (same lock-move skeleton as v5/v6) Wang's v2 has the same lock-move skeleton but is missing three pieces we've added through review: - lockdep_assert_held() and __must_hold() in serial_get_or_create_irq_info() - hash_mutex covering the request_irq() error cleanup (use-after-free fix) - addressing both the use-after-free and "Unbalanced enable" races I'll add Co-developed-by: Wang Zhaolong to the next revision. > hash_mutex is no longer an appropriate name for this lock. Ack, will rename in v7. > Unrelated change. > Unrelated and mainly unneeded change. Ack, will drop both the blank-line removal and the return 0 change. Thanks, Qiliang