Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2402939imm; Mon, 28 May 2018 07:28:15 -0700 (PDT) X-Google-Smtp-Source: AB8JxZop/waZ3stlXtSjiFeaFIQwBUZzWWATiqLluGuo8PmihmgAvRo1O5A27KjiomIx+2+laYBz X-Received: by 2002:a63:203:: with SMTP id 3-v6mr10800229pgc.133.1527517695868; Mon, 28 May 2018 07:28:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527517695; cv=none; d=google.com; s=arc-20160816; b=mftlSthWXVw6QWuBqKbGEEdHxNQqc7SlqkkHI1urOXTz/5HGXXa/9VFcZXoa15Hc1N I8vof/oi9j4DAebuHJtVptkLACBEIJKPgl6v7YkQUZ8Z5xk5lF7la1KdVmlXMzhKEHtc /mVy5130sR7JZz2TC3MhlPgFFitULIWDfB+bE1h84x7Fzh2Pcb9PEquwJNewiqCG+8PY BPXCwQZrUA8olmvmR9uQ7mzYyvZVrqQCifScBs6KKZ4xbuxfbbEJH3eyw7xPltpTWuNq C9AZGr63RqYBx4hb9Q874VaDxHEFahtZNk9O06DxgUoM4vUk0VCcPOc62Be/7/w4RLCT /+Mg== 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=lhbu4XEBU9Z+f9H/1Q0nCbEgW+Xa/Exm4wl3AlssBgc=; b=qnmxM8ZZCa1sSv1CG76pmTEjKLzTG7JpE6Vv8BrbyzXn+Q3hcOGVjcUBWwy9ogJg8B zhGyITxl13e6XkiySGRAzUJnJiyp/FmyKeGufEj60Vpyyw1LP9RqU79e9tZ9kpHsHGAP ak67MmYsrxUJf1sJyLd4kBEi1aF+BaZODZkkP+tJDtlVJbalO48ttJPw662ZoOb4lMO8 LVnwh82WRs0uGBkmHB4GiBeOjWA3hl6+Mtsp6upspeQIbS0+R7Fro7hag2q+ImQ/Z8WF 6ZmkZquCNpByVY7LtQ+hTd/jtfCHTdesV/fpzunePUR14MnUKdNtR4Ed6GiRoZtVbEoB Bf0g== 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 y125-v6si7812148pfb.284.2018.05.28.07.28.00; Mon, 28 May 2018 07:28:15 -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 S1165696AbeE1O1Q (ORCPT + 99 others); Mon, 28 May 2018 10:27:16 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:38218 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161787AbeE1O1J (ORCPT ); Mon, 28 May 2018 10:27:09 -0400 Received: from p4fea4eb5.dip0.t-ipconnect.de ([79.234.78.181] helo=nanos.glx-home) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fNJ71-0007FY-T6; Mon, 28 May 2018 16:27:04 +0200 Date: Mon, 28 May 2018 16:27:00 +0200 (CEST) From: Thomas Gleixner To: Tariq Toukan cc: Song Liu , Dmitry Safonov <0x7f454c46@gmail.com>, open list , Maor Gottlieb , kernel-team@fb.com Subject: Re: WARNING and PANIC in irq_matrix_free In-Reply-To: <1b4ded38-f217-fafa-d920-cddf980a685c@mellanox.com> Message-ID: References: <16f47fa4-1555-cddb-3dfb-7d56fb992ea1@mellanox.com> <1b4ded38-f217-fafa-d920-cddf980a685c@mellanox.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 28 May 2018, Tariq Toukan wrote: > On 28/05/2018 1:53 PM, Thomas Gleixner wrote: > > On Fri, 25 May 2018, Song Liu wrote: > > > On Wed, May 23, 2018 at 1:49 AM, Thomas Gleixner > > > wrote: > > > > On Wed, 23 May 2018, Tariq Toukan wrote: > > > > > I have your patch merged into my internal branch, it prints the > > > > > following: > > > > > > > > > > [ 4898.226258] Trying to clear prev_vector: 0 > > > > > [ 4898.226439] Trying to clear prev_vector: 0 > > > > > > > > > > i.e. vector(0) is lower than FIRST_EXTERNAL_VECTOR. > > > > > > > > Could you please enable the vector and irq matrix trace points and > > > > capture > > > > the trace when this happens? > > > > Does the patch below fix it? > > > > Thanks, > > > > tglx > > > > 8<------------------- > > diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c > > index bb6f7a2148d7..54af3d4884b1 100644 > > --- a/arch/x86/kernel/apic/vector.c > > +++ b/arch/x86/kernel/apic/vector.c > > @@ -148,6 +148,7 @@ static void apic_update_vector(struct irq_data *irqd, > > unsigned int newvec, > > * prev_vector for this and the offlined target case. > > */ > > apicd->prev_vector = 0; > > + apicd->move_in_progress = false; > > if (!apicd->vector || apicd->vector == MANAGED_IRQ_SHUTDOWN_VECTOR) > > goto setnew; > > /* > > > > I took it into my internal branch. Will let you know. Note, I'd still like to see a trace w/o the patch which shows which order of events leads to this. Even if the patch cures it, it might just paper over it and not fixing the root cause. Thanks, tglx