Received: by 10.213.65.68 with SMTP id h4csp124627imn; Tue, 27 Mar 2018 23:43:49 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+tiJhavRuaMa7BmCP7jDgY9lwJKXKg37j1bLzV9DeWYM5gwcP8dkT4CC/SoxRnF0EE6OcK X-Received: by 10.99.7.138 with SMTP id 132mr1682442pgh.45.1522219429671; Tue, 27 Mar 2018 23:43:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522219429; cv=none; d=google.com; s=arc-20160816; b=Xaa37VwXkWQapQHjxshs0d14D3WzemjS5CpigE/JOlwjLt3kcnayw+B8ZRu0BBmEJw gO7QgDJOC3LfF99ijmA1016zfT9aR55LFunuEGIBQ/7WAXd1eyMhbmqr6if6hd1A2t3k F1U2wfUxbADrbO8kOD53HK1WQN6TjhpQ5JZc6MGYhYKhaN3Tmh2NIw0aVfAMX+R6uSHc XUSKM2qnMUNwK+VsO3rZcDHOL/oDTZ10UVXMJl+VInkDNjelBwASxKHvWDpfAnC9tpPq 8uNlCRU40bAHWubse/OyNFPoGBIpwsScxE76WBnupBWQybGlfNaghUgYsZYkGXvT5SdD eZ6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:arc-authentication-results; bh=ARZYBPjTFy/gPUJaJdwXWlBLyjWuDn1/J2akmGIVG1A=; b=YI49g4jEryACG3pI9mPn7jMSqg/kpHa47uT4dm+6WF4i0Db/idVsy4DQGg/tTZDQcW H5GJQV9oqcfp6QMNVgrZGRflAJftCPseHOfRBGn0SGU4/DL/rjHycaKU9abbvhwocH8x yHNsLcnNjMpYjeoGTzwelzmt4fR6eJAIkJA0AJ5RCqouZ62N9ZydQAWmdHx1Ewv1TRB0 6wTuInmNSemedJdl1LLKi+j7B33/uTxyM1Viv6MkvO/MEizl20PyhGPiNFCCePSnq0MC JoAaHj40TerKWPg0XRI5fq02gw6FAmYBo84dkrDEI57mAH0F91RkiL0fVNEaQj5ANeM6 jgkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r16si2006487pgq.324.2018.03.27.23.43.35; Tue, 27 Mar 2018 23:43:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752342AbeC1Gle (ORCPT + 99 others); Wed, 28 Mar 2018 02:41:34 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:56444 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750703AbeC1Glc (ORCPT ); Wed, 28 Mar 2018 02:41:32 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 047DE402314E; Wed, 28 Mar 2018 06:41:32 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-135.ams2.redhat.com [10.36.116.135]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1D71710B0096; Wed, 28 Mar 2018 06:41:27 +0000 (UTC) Subject: Re: [RFC v2 01/12] KVM: arm/arm64: Set dist->spis to NULL after kfree To: Marc Zyngier , eric.auger.pro@gmail.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, cdall@kernel.org, peter.maydell@linaro.org References: <1522159456-10419-1-git-send-email-eric.auger@redhat.com> <1522159456-10419-2-git-send-email-eric.auger@redhat.com> <26bb42a7-d946-e52c-68e6-eaeaae325983@arm.com> Cc: andre.przywara@arm.com, drjones@redhat.com, wei@redhat.com From: Auger Eric Message-ID: <969f4dcb-5f77-ddbe-7e72-322793065ccd@redhat.com> Date: Wed, 28 Mar 2018 08:41:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <26bb42a7-d946-e52c-68e6-eaeaae325983@arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 28 Mar 2018 06:41:32 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 28 Mar 2018 06:41:32 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'eric.auger@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, On 27/03/18 19:10, Marc Zyngier wrote: > On 27/03/18 15:04, Eric Auger wrote: >> in case kvm_vgic_map_resources() fails, typically if the vgic >> distributor is not defined, __kvm_vgic_destroy will be called >> several times. Indeed kvm_vgic_map_resources() is called on >> first vcpu run. As a result dist->spis is freeed more than once >> and on the second time it causes a "kernel BUG at mm/slub.c:3912!" >> >> Set dist->spis to NULL to avoid the crash. >> >> Signed-off-by: Eric Auger > > Fixes: ad275b8bb1e6 ("KVM: arm/arm64: vgic-new: vgic_init: implement > vgic_init") Sorry for the oversight :-( > > Reviewed-by: Marc Zyngier Thanks Eric > > M. >