Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3474897imm; Mon, 4 Jun 2018 04:20:02 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJnBWTcZHCv98itzOdXKgC9IVTiYF4m4ifTOqdg1RpaoLLanHh8ygOxRs0NWCQk00H4kvnJ X-Received: by 2002:a17:902:26a:: with SMTP id 97-v6mr21789339plc.367.1528111201970; Mon, 04 Jun 2018 04:20:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528111201; cv=none; d=google.com; s=arc-20160816; b=OEgkDeUJgajkppJIqLNSksa0ilWUXGTpqXyf022153Fb8yuzI2Q61uNJnaBkfvdYcz rfz+mkkDuYTBLe+BaFfn3XBJSJG2qaijzqPzfwQGfc/rZrkZY9fEMMUzuski5IMCDDta gCxTtSqsBerkHhtqZhWAR4gNSPixIZfFPmf6Ur52w0uRFAh4sk4Z70F1MZXQRPsXQ1FY u84ChOyu4A7AYCNLXMEXhNkUl0uYscDOF29B4jSjA7Z0U7F7Go8WneZMsPyKlL+we5Eq aEwM9Vn6k4bjJBrXNZZ87G6TqHpKGASwe603EYcKb07bLtbo0/VhESHq0ozyPZWIsVOY cl1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=bI4F7+2orsMuIxIAcEa5ZQKpMBgAfgltbqV6dRVVpwE=; b=AzyfVtLgZyLzgQXpmk8ntTTvQmyqGLL4rcjBTTy5BMZv6YTOqFZ55dwrX1CD7N07K9 OAdIkQYg1nmlsfqeKGMq6IoZZHlfRNop86iXX9hMgpOc0qqf0j0xbOsqsgD6zvJsxAoa qRAKeaB+PSqjbZzuFJv8W9nyaKgCCLCEjwOrk+vMGLYh8DyYMke58TOcNuiTJlTH/lZP mkdXN2h8TF+L5Dwu9jnA5lWs0vwK5k3m53LTaT0fbATOaSv443vjaNARoeKIRzr1gYjD tsdKF4x/UYmQiXU2MFQjQWhWll7JfUN0OXcnbevwq74clAiS9sf5/32mZkVHArZrGFx9 xbAg== 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 h71-v6si5883308pfe.332.2018.06.04.04.19.46; Mon, 04 Jun 2018 04:20:01 -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 S1752537AbeFDLRy (ORCPT + 99 others); Mon, 4 Jun 2018 07:17:54 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:39200 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752179AbeFDLRx (ORCPT ); Mon, 4 Jun 2018 07:17:53 -0400 Received: from hsi-kbw-5-158-153-52.hsi19.kabel-badenwuerttemberg.de ([5.158.153.52] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fPnUj-0003Rv-BH; Mon, 04 Jun 2018 13:17:49 +0200 Date: Mon, 4 Jun 2018 13:17:48 +0200 (CEST) From: Thomas Gleixner To: Dou Liyang cc: Song Liu , Song Liu , Tariq Toukan , Dmitry Safonov <0x7f454c46@gmail.com>, open list , Maor Gottlieb , Kernel Team Subject: Re: WARNING and PANIC in irq_matrix_free In-Reply-To: Message-ID: References: <16f47fa4-1555-cddb-3dfb-7d56fb992ea1@mellanox.com> <09A22A95-6BBD-48EB-A2FE-42BF6244F751@fb.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 4 Jun 2018, Dou Liyang wrote: > Here, why didn't we avoid this cleanup by > > diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c > index a75de0792942..0cc59646755f 100644 > --- a/arch/x86/kernel/apic/vector.c > +++ b/arch/x86/kernel/apic/vector.c > @@ -821,6 +821,9 @@ static void free_moved_vector(struct apic_chip_data > *apicd) > */ > WARN_ON_ONCE(managed); > > + if (!vector) > + return; > + > trace_vector_free_moved(apicd->irq, cpu, vector, managed); > irq_matrix_free(vector_matrix, cpu, vector, managed); > per_cpu(vector_irq, cpu)[vector] = VECTOR_UNUSED; > > Is there something I didn't consider with? ;-) Well, that just prevents the warning, but the hlist is already corrupted. So you'd just cure the symptom ... I'm about to send a patch series which addresses that. Just need to finish writing changelogs. Thanks, tglx