From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (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 819E825A2A4 for ; Wed, 8 Jul 2026 08:08:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783498113; cv=none; b=RhOSFl7mz49LBljDqtxHnjI9MmlFpxHv/GFiOqIPiiktVrnT4IWKj1fdc7KB4GC+KcZKLruxivNHLBzU4NvU+bkymZQp2UA0PhR0G0lTrg6ijwfxRqWrw8GRtgxGlY7yEhQkWtOPur4ivwG4Y2M25aFOoNehRtivEsoYD6M9G70= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783498113; c=relaxed/simple; bh=jkeayPSZulQ9prUpZMNSrBO5oExtprLg/kYB0TR6HfE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=h5WISZMsPSsLmkwQHdTvsG6CePGeihsLpEkP5kZwu/Ep1vt9LAoWcWE+vJnFU8CoRlPx2BpsLqzWt75YnkNLvFIx0wkNozkRfBxRG8Xt/4UirBOxFdR5JdbXx8n5e0Ko96gwioZcoM96w09jXvVNkdC/VG3Ny6+YwxvUykom6E0= 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=LpTmylg7; arc=none smtp.client-ip=209.85.210.174 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="LpTmylg7" Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-842338c18e0so304864b3a.1 for ; Wed, 08 Jul 2026 01:08:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783498109; x=1784102909; 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=j8rBUcXNXqhCtAAq0ugm4aLb0G5OINBhuMNxLh4q8Uo=; b=LpTmylg780Sc6hmznHnJPITFePFseXCOOrP+QxjGCxyXI5Wj9tadW04vVtH6eHGwTY YG0/vRzMbzRtIG+BHII+j1s0KT1PriUrUElMy4E8cekJHHg0WyEIfaYGVQa5/1kFaELb Faz2B9mm/P8M1Qq4DNTYF158ZNUEg5DUNkvBLy0wgUF1/plbkT8F2t3DjsWRed10EK45 wryJcoy+4cS9ooUFbQiOJzXCHQEvKl+PswvUxO2tFumhca7T1JW2xj0EZi+ka5uHQmfr EKip+wgSaaICQqBePa1zkpv1jifIPdjNmTojuMjOSlDbOIC8Q3kXSiAF9/KdhwMQ2Tca iPvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783498109; x=1784102909; 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=j8rBUcXNXqhCtAAq0ugm4aLb0G5OINBhuMNxLh4q8Uo=; b=b5WN40ycr4xs/M1P3NLjThOKqKHX9J12MySS3EVLb3ZjTBJg/0U5io6QwHY9v2afLE 2gZIHLpoHK78FRFqNltvmPkG5yC2+SFTv9t2yogt0bZEvrF2mupTOiPG7pgUYnSiPhVo 7//DKSyOwexgCaZXhOd3bwUtYz2oQwxA1KqTxMC+k9phSIN/Vg8L7pUxap6KyIePcW7G TgrPiTisi3UqfecDSTgMcl+8yab76DY4jE/7jLpnwaddWGRLEuaV2iVyVNaKFFTIFOlU 4HW5B67GoUQV7Cs7KgN6Cv+4ub7CmTunwtHwkTIxq4KD+Q3v9PdoLlR0OhoZwzXV4bOb g+ug== X-Forwarded-Encrypted: i=1; AHgh+RqWi8Stix6k7G3tSjvCoamrWSpMZRjFzwk79UIrLf7uZ+DbUClf4BzlhrVuey8/AEn6DFLLsxQFwc2CBXo=@vger.kernel.org X-Gm-Message-State: AOJu0YxzUVbO0u/jPGU5+s+6fjPvW8NV2h1vWqu1geCmlu7zY9MbpRpf ifQX/LXqIySUOGr+X1iT0JkZhEssbAduxSnNRwHUvtvDDr/PXPo3kuwp X-Gm-Gg: AfdE7cke9QIeHOM7fVf301bIXHIfqp7SW5alZ7dFfEdlN0b1CKjyD4aDEkI7phacyEe CJ96YcUX0kcfvvjxqi0HnvlS8D8i/xqSRQ1kD78B4E0KWV0KOeh27lrVf/rdnAdi8JX0Yl0WCfL Jge01j3MOvMiAoLqIsSS9e59OZiwf2sQCt98chhQxCDnHnco3qrlGn7SyqXJbliIpZVWd7lV8kJ +JLizyfGzZmOXHnvLbdpXv8Yz6DqnAZRddGIw7L6jz1Zq+/IAS++uUreA4r4n2w1MEXgTlk+EOy VX1fhVCQPO20Xhg4h3M5C3JjZc7AJARey9mi6vZPJr2lAiR7atqmknCXNsSiX5YkUJJ9iq+PD5+ a8+GNuzze0OJEeaapBUplbh+Ip6/5Op75qO6KayMgeN05BUY/eUnQPEcBbvJxUyhxewiF2Oz0fZ S0mNSmOLXuLhtV1kQN/A== X-Received: by 2002:a05:6a00:6c9a:b0:848:2a55:7110 with SMTP id d2e1a72fcca58-84842febf46mr1920240b3a.36.1783498109347; Wed, 08 Jul 2026 01:08:29 -0700 (PDT) Received: from ubuntu.. ([138.199.21.246]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-847f6d7c2casm6620038b3a.43.2026.07.08.01.08.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2026 01:08:28 -0700 (PDT) From: Jing Wu To: wangzhaolong@fnnas.com Cc: jirislaby@kernel.org, gregkh@linuxfoundation.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, yuanql9@chinatelecom.cn Subject: Re: [PATCH v6] serial: 8250: fix use-after-free in IRQ chain handling Date: Wed, 8 Jul 2026 16:08:19 +0800 Message-ID: <20260708080820.62288-1-realwujing@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <5cf37150673ea4d5c28f94db91cdf68504b50522.f7d28dac.3ec0.4c7f.8bb2.ce59501a4b8d@feishu.cn> References: <20260707-bug-221579-8250-shared-irq-race-v6-1-f8c499a90bdd@gmail.com> <0ede8499-abe2-41d3-bb0c-095c02c5b699@kernel.org> <20260708071138.3698581-1-realwujing@gmail.com> <20260708073938.3975921-1-realwujing@gmail.com> <5cf37150673ea4d5c28f94db91cdf68504b50522.f7d28dac.3ec0.4c7f.8bb2.ce59501a4b8d@feishu.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Wed, Jul 08, 2026 at 03:53:26PM +0800, Wang Zhaolong wrote: > Just one technical clarification: my v1 also moved hash_mutex to > serial_link_irq_chain() and kept it held across irq_info lookup, i->head > publication, the first request_irq(), and the request_irq() failure cleanup Your v1 commit message discusses only the "Unbalanced enable for IRQ" warning — it never mentions the use-after-free. Our v1, one day later, was the first to identify and document *both* races. You confirmed on May 29 that our v3 fixes your reproducer. But the v1 lock-move is not the issue. The issue is what happened after. Our v5 (Jun 24) added lockdep_assert_held() and __must_hold() — reviewed by Jiri on our v4. Our v7 (Jul 8) renamed hash_mutex to irq_chain_mutex — per Jiri's review on our v6. Your v3 (Jul 8, after our v7) copies all three of these improvements and presents them in your changelog as: "Changes in v3: - Rename hash_mutex to irq_chain_mutex - Add __must_hold() and lockdep_assert_held()" That is not a technical clarification. That is taking work we wrote, reviewed by Jiri on our patches, and claiming it as your own. Add the Co-developed-by tags. We already added them for you on our v7. Jing