Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp347579lqg; Thu, 11 Apr 2024 05:09:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXPUGkN07fCeThskxQ1eYKEtHYbUvZ+7wmKLZjX2EytirVc4EI+hVDB97dFxREh/zbgSCxnHdWy2Qw8TKPSPgqwawi26SkDg1I2qG69BQ== X-Google-Smtp-Source: AGHT+IFqfqAAy8kAo/PQL/2f5GWgNSL1SX4PSokRqShQkr9lnKM4YvNnClterXiby8CT/rL5U95G X-Received: by 2002:a17:90b:3002:b0:2a2:f9d:f600 with SMTP id hg2-20020a17090b300200b002a20f9df600mr4914769pjb.22.1712837385355; Thu, 11 Apr 2024 05:09:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712837385; cv=pass; d=google.com; s=arc-20160816; b=LudDWcKWOmwv1TAlr52SQlvTbMP3APioQZjIwSpPY6jq/GTEX4SdELTgFCFeTu55uE u42BwJMw38iXeEcOZZo3dZfmQspeDRwdXVK3ESn4AdK3TkcY1EuZxaD3YuNBt82DszZm NY1PVjJvVQbvhl7mBYNrNRvltfo3l53Q0oL0crUNKMtKS+0oohQzJp4z4FMnP13+8QmG wJ6YYARZINCPO6GLS3jTl6az+iPMyFSpoSJsUl0SgrdrRJ18ObDH1gBhsfMIGtdRI96l 2EuTzoY+ctuDuhiYU2pcvX8LHyeil5tDkdhrkle0MngUgLKMFVhuz48IGjsrAlUhELe3 I+lA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=IUDw7H4hboh4qzKlyLqHQAVJxJPRvKYfydLuR3Ts37I=; fh=5UoW7Ejk9Gwo/8A+nEPYsseNQhG4OkHN7ichOLud+n0=; b=DCvTSZEJS0+ATtjvYqFy7igb5OTrF4ouJMuyPL8PwIC/W2vlInO5fs67wRnmnM2TeU NIGuGan2UnOzgBn093LFcHKj6YzPDuBcChmsw4JvWDFCNNZpprTTOwUlvjPqXtNv22I8 YcXR+ioYITnsk0Zy8qOhGSjP7lTFS4WPj0a3MzFVPj9NMzetsmq7E8UPH2hI9cObIfar xVc7e6DxJZ3GYElEYeCP6RW7tn97YaSqu3HsrLuDdMOIQ0A55IiuYjvkzR8wqLa2k7JR qtE5lxZEJgDdpCz+mv65FquNf9evUswvhlG29Vbr1yo+gpu1U6Lt5wycxHpif54+REvb x6ag==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=M28gMKaR; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-140390-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140390-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id pi11-20020a17090b1e4b00b002a5ef7a3d69si2570350pjb.100.2024.04.11.05.09.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 05:09:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140390-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=M28gMKaR; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-140390-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140390-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 0CDDDB24BCF for ; Thu, 11 Apr 2024 11:58:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E77A14AD02; Thu, 11 Apr 2024 11:58:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="M28gMKaR" Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) (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 99DDC13FD9F for ; Thu, 11 Apr 2024 11:58:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.132 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712836692; cv=none; b=ix68sF+kV80hH/SNcvTNHgVgeM5ABAmugRFXlf2l9TDp7lEqbFxb0cORfpvoCbqnj7TyOgXQAFV3TlQu5adWGUfFlLRM22HO+ueIrN++jqHLPJe5vV66WUCYluvJw1nhvCNQm2ebojRiSOgzSlddtn1jS5DpQnqAcmss+5UxO+c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712836692; c=relaxed/simple; bh=IUDw7H4hboh4qzKlyLqHQAVJxJPRvKYfydLuR3Ts37I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=fRb88Wo6ePy+rdfwqIGkR4PqY06XCDe6AiBQ+TTjgJDN/mfO3044uwYhYsMpOWNULFCjRJn58YE1zpe/xhV2PJCk3zHvc/NE3c6rDf3qIPvMwF6qwm4PqoS1xpfngQW/Y10xiiH/13FrxWst8iGUTO6S+IfvhnPH6UUZ8jebpRU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=M28gMKaR; arc=none smtp.client-ip=115.124.30.132 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1712836687; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=IUDw7H4hboh4qzKlyLqHQAVJxJPRvKYfydLuR3Ts37I=; b=M28gMKaRQjRB+j+hcKQ52uH7QIUGHBFAEH+wesyLnSSVE2QLw+FgZSQUwL9NubWDcYxuBj/XHsksKHDN5OB9cvPh/KRDUoKWX0JDfeBArqh17PZbcqXupkAjALlpoMN1ql1wUgTE5KT1BrnP3UCiw7a0mG+YmEb9hsowrpQ8hjI= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=guanrui.huang@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0W4L5Jp0_1712836685; Received: from localhost(mailfrom:guanrui.huang@linux.alibaba.com fp:SMTPD_---0W4L5Jp0_1712836685) by smtp.aliyun-inc.com; Thu, 11 Apr 2024 19:58:06 +0800 From: Guanrui Huang To: maz@kernel.org Cc: guanrui.huang@linux.alibaba.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, shannon.zhao@linux.alibaba.com, tglx@linutronix.de, yuzenghui@huawei.com Subject: Re: [PATCH v2] irqchip/gic-v3-its: Fix double free on error Date: Thu, 11 Apr 2024 19:58:05 +0800 Message-Id: <20240411115805.115673-1-guanrui.huang@linux.alibaba.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <86r0fcrvsz.wl-maz@kernel.org> References: <86r0fcrvsz.wl-maz@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 if (vm != domain->host_data) This is just a safety check. It looks unlikely happened. After all, vm is obtained from the args. If the caller has a bug, can we check here to avoid possible problems that may arise in later code? Thanks, Guanrui