From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2A828CD11DF for ; Tue, 26 Mar 2024 09:44:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:CC:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XuN4UjN+otWzHfQlm1sBBQsISX1LNVbnd8jEFkDZw6U=; b=yfLALaJbD0Yo1dMyGwBS7knA9w 4HBBhj9CYgCKTm5GY+Y9lLvEG8uP+deRIlcPinX50SK+0iw+X2et/68sHLckkMjdgvGcIPr8zbdmZ riu1UsBSEaMSz69zpxgJ+VrWV5QJjKfKTH0+e1m/F/dvispHONfDd1Wntz3oEZ4cUMpWELMLr7+ja YBdMKuaVW8MUeg8v0ikjLHDeyHtEHBPh2p5anEPuBg3OJj+2am+PHp9J6EpmKWOyc2oZx+yKB8hUu 4NFprkhZCTvP0yrMzSUgdk5aFsE/jdjiqk4nBUTA+p+h6sMPNw7J+vcecE8/Fyp1tLLQ9k9TF3juY Oo/pmaDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rp3La-00000003sNJ-2cPO; Tue, 26 Mar 2024 09:43:58 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rp3LS-00000003sJc-1LRN for linux-arm-kernel@lists.infradead.org; Tue, 26 Mar 2024 09:43:53 +0000 Received: from mail.maildlp.com (unknown [172.19.88.194]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4V3lGK1tszzRjmh; Tue, 26 Mar 2024 17:42:49 +0800 (CST) Received: from kwepemm600007.china.huawei.com (unknown [7.193.23.208]) by mail.maildlp.com (Postfix) with ESMTPS id 99F091402CB; Tue, 26 Mar 2024 17:43:40 +0800 (CST) Received: from [10.174.185.179] (10.174.185.179) by kwepemm600007.china.huawei.com (7.193.23.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 26 Mar 2024 17:43:39 +0800 Subject: Re: [PATCH] irqchip/gic-v3-its: Fix double free on error To: huangguanrui.hgr CC: , , , , References: <20240322023810.62914-1-huangguanrui.hgr@alibaba-inc.com> From: Zenghui Yu Message-ID: <661a577c-b4bb-e438-6ba5-6ed90b08649f@huawei.com> Date: Tue, 26 Mar 2024 17:43:39 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20240322023810.62914-1-huangguanrui.hgr@alibaba-inc.com> Content-Language: en-US X-Originating-IP: [10.174.185.179] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600007.china.huawei.com (7.193.23.208) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240326_024351_538811_8CA92EAA X-CRM114-Status: UNSURE ( 8.25 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2024/3/22 10:38, huangguanrui.hgr wrote: > We notice that: > In its_vpe_irq_domain_alloc, its_vm is from args, But in its_vpe_irq_domain_free, > its_vm is from domain->host_data. They *should* point to the same its_vm structure. > Will these two values be different? For example, when other bugs occur? Of course they can be different if there are *bugs* but I guess you won't get any further (e.g., you hit BUG_ON(vm != vpe->its_vm) in its_vpe_irq_domain_free()). The right thing to do is fixing the bug rather than papering over it. Zenghui _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel