Received: by 10.213.65.68 with SMTP id h4csp866625imn; Tue, 27 Mar 2018 10:12:34 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+MF05Fl3BeITLLC3BK+oe5+gOwE44lTO9+pRzdCFG2T4RggvK87cNtT3dRIP2RrhKk/mPh X-Received: by 2002:a17:902:830a:: with SMTP id bd10-v6mr159445plb.322.1522170753992; Tue, 27 Mar 2018 10:12:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522170753; cv=none; d=google.com; s=arc-20160816; b=ahooWylbywsK0LsBCSJNDWIildBTrulJwv8sxd+VqWsA4fQBYIp5xVjoh7uyqzUfbh l6FUNIB7e/83WN3WJVY/Brj6cEd4zgUTIoFqaeW0k9X1jN4zN7hCBr3/+MURBTjViXaa 069tiM5JW6CJ7bWyJRLA9RZUSDvah1SWlwkO72mjq86xfGEwhPkNe24TD5wkAwpDgSRj omXuZHx0iu1a9/sPFPMOPtyIHjfISMqP8jDrAKdBW1tlj+JRJegon3oDceLU/5Derufa OiekhAgukxGBRopOSa94mR6UAp0T5ySViV9zW5cbEztqIrGm9pbI0u2OVAnGJFNAknC5 Futw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=krh+lGhURd7gZBNiv40TRoxzU445MZPk7+YRPZtlowo=; b=x5TI5DrbChmNJzuEDcn7gDcc2SUGT9xKjfYcvQ0wuFtb1h8/Or5o1b6kMcWyNGLIid +UulIQa2P6x613R81S8Lbp6zSwfZLVWFVin/7j1KUAgZbCcHEXKbqM+j2e7NsOYilvpD k8JL/yksYYNC+OsPdbMDpr5jPxHIPJ6j8hS+w07+FStPya44KKj+2eq6k0ZUqixSkxvD 8RyEw2O1ytlYOjRzzs9G5rkxBUIZ+xY/AHElbypZBAY1ZshfjfyQXddhhJVj7spvxabk KISk7OX+7jvh6WknS1qydlnAuoM+SHbVUTTho5n3F4qfasZW2b0BX3bGo67rmcu9sAR7 stsQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e2si1118565pgs.22.2018.03.27.10.12.19; Tue, 27 Mar 2018 10:12:33 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755049AbeC0RKx (ORCPT + 99 others); Tue, 27 Mar 2018 13:10:53 -0400 Received: from foss.arm.com ([217.140.101.70]:60126 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753138AbeC0RKu (ORCPT ); Tue, 27 Mar 2018 13:10:50 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D4C231529; Tue, 27 Mar 2018 10:10:49 -0700 (PDT) Received: from [10.1.206.75] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1F9333F25D; Tue, 27 Mar 2018 10:10:47 -0700 (PDT) Subject: Re: [RFC v2 01/12] KVM: arm/arm64: Set dist->spis to NULL after kfree To: Eric Auger , 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 Cc: andre.przywara@arm.com, drjones@redhat.com, wei@redhat.com References: <1522159456-10419-1-git-send-email-eric.auger@redhat.com> <1522159456-10419-2-git-send-email-eric.auger@redhat.com> From: Marc Zyngier Organization: ARM Ltd Message-ID: <26bb42a7-d946-e52c-68e6-eaeaae325983@arm.com> Date: Tue, 27 Mar 2018 18:10:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1522159456-10419-2-git-send-email-eric.auger@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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") Reviewed-by: Marc Zyngier M. -- Jazz is not dead. It just smells funny...