From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752653AbeFDLRy (ORCPT ); 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 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 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