Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3207836lqp; Tue, 26 Mar 2024 02:47:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXk6JCGKRuUsq7yjPqJitT5/4QVmRUrsY+yyvx6bQXatnl4IHVYpRD7/Cms2QUErTfCVlCfFweZrJKXZwGeBkH337yp6tjGi6GLva/8kg== X-Google-Smtp-Source: AGHT+IFHsLLYWWFixqU0GJysjQezTnKzzUAjs4hY6mxsWSnnqkenBSnX4NC5gTZ1zqT/tHDRFGJV X-Received: by 2002:a05:6808:6494:b0:3c3:c8b7:c05c with SMTP id fh20-20020a056808649400b003c3c8b7c05cmr6805235oib.57.1711446449258; Tue, 26 Mar 2024 02:47:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711446449; cv=pass; d=google.com; s=arc-20160816; b=PyeePc7QSaHvfbnutF3Ai2NlqUCkcvBFjB2AqlvdLdWEaMoVgHmZ+OPc+9ngMqq5O6 WU1fhk/3Va0HZchkuyulgocdTyGyuoQ5C8G1exlqKA4dc8WwwFmb+GxW+OYGc/uwLZfn obX8LfxOAFGjNv+lQFype8oW7HYCylyzKcO1/DOR8w+KY8IGkmDL3k3PwY3os9oMNpkR p45JIk4taZvqiy8ZYnTvQcy6pzlxt4wuLohzzVwiOtolfvU3C8oJrRMCmaOCkEL5GNLH 3A6nfY0KkETItBpHJUDwdxgSIPOu+JnniC8IXzliLTBKw5KKy4n7dCd4uS1xYz9sbOII AFVQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:user-agent:date :message-id:from:references:cc:to:subject; bh=wipVMc+NlSaL82f8xhMlxm/RnK5hF4qw47WslRc5PQw=; fh=4BXh/mBjX5h3dV+KCG1CeD0mM/evyvFyzVgpUjTlB90=; b=m5eS14s1AYWHWigij4BQ7tKApiZPnfn2Ilyh0XZodxooWWjtAYg2K/tjmxG2MoZmUg J7vjzrdTKbCFO7WjLgS+C5I+3S3CE/uEKxJPoLrDEZCKRwbkk9j/+K8cGzJ+o4nyvp9m tzivA2VgJvht/9q8tmhpczAOu4Ql1aMJw+e8lqTQESzVjWETa9y1qTo+1EGlWhQdecXc zV+Bj3NHLiXnyxvct5vw4nRUQbdQAr+X0+evhB/NM34YLZehP1eJ2GkeiPDbcFL+q78e yJHQL4YvPBaHUiT/9Yp5J0m9uwtoGpM8z95b/WIRO679ACqFMkrQkmAeolwB+aYEEWpG bopg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-118705-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118705-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x22-20020a05622a001600b004315f241a3esi2848051qtw.240.2024.03.26.02.47.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 02:47:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-118705-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-118705-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118705-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BF9A61C2ACEA for ; Tue, 26 Mar 2024 09:47:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7873A67C53; Tue, 26 Mar 2024 09:43:46 +0000 (UTC) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 27EE41B960 for ; Tue, 26 Mar 2024 09:43:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711446226; cv=none; b=gpUyhX5EY/bQe6flr7co68qkF4LSFifImKcHniN3JhhmOhmMQKCRSkvjiSPzswE6ndXuCMYd2sPEk2IWDt/pVoZhXHHLNVMQSxsgbMpfJ+N9pP1zLAdYA9Z49vI0OGbkWT+B3XsMD/66TtdKz1lBQLmM/7X9/t1UYuvWmgLd8Qo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711446226; c=relaxed/simple; bh=wipVMc+NlSaL82f8xhMlxm/RnK5hF4qw47WslRc5PQw=; h=Subject:To:CC:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=aZXCuFhOFOOeLt06/3G3pdD74YdDLUKI9snL3oi7oXFllrkS5tW3r4hKGIdqafgEfbTcdnORdQ/7NcSxvPsIiZeSpDaN9aAfZqeveEIokeKCOqDFiaYIU9A/VjsCNtHH+h4nAVkq2D/2BfgrEm/ZcBeXHlvgAcNRZEalaUZA7o0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.188 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240322023810.62914-1-huangguanrui.hgr@alibaba-inc.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600007.china.huawei.com (7.193.23.208) 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