From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDF71ECE58C for ; Mon, 7 Oct 2019 17:02:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C3E44206C0 for ; Mon, 7 Oct 2019 17:02:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="t8xl8m3d" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728726AbfJGRCW (ORCPT ); Mon, 7 Oct 2019 13:02:22 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:35144 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727801AbfJGRCV (ORCPT ); Mon, 7 Oct 2019 13:02:21 -0400 Received: by mail-io1-f66.google.com with SMTP id q10so30267308iop.2; Mon, 07 Oct 2019 10:02:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6A4rIUjcqGcThTcraJEF4GgxX4VhVAP8ORGNSx+WSeU=; b=t8xl8m3dFqfl+nwGVBAgaXTXzMY7VAwFh7x79Jii2SiVGz8cM78abhKWq81YL4zJYC Wo0hSD3B9QLLzEcwcpvTjO3VEHCYatyO2sl3a6SCvXi1vgTdAbzVIMQRdoKaRjuRWUS6 R9l1baAxytuK7awtgDHx0x9A735It9GgDptGwPIFHEJ3DAe807vfCjgu87HUA4nrhrUj hlNsqonHVjgh0NCHpFMt9FfVOM6OuUr3rFjc3Rv/tM8mzhGTFs/L5YCxLHok5cID/1vf xf/cFmgU1mdMo60rk4GHGxvvRYaC80bPMIODCgB5P4ofd3lf03gYGUW6MTBS9gIE4QF5 zyxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6A4rIUjcqGcThTcraJEF4GgxX4VhVAP8ORGNSx+WSeU=; b=J0wV3ilZawKQccMDIfH3C56K9UGq+C910wtQPXCJ894mA+Dl8/1h3g6L7OlmL4TT9y ckfnyBr1i6/tItxSfcdyqTUPNgpw4VHkwZDiK8pfPdVtrhd8Bq/yyJz2IWDqlrMpY8Ja pgwG8JcfOk6RaqJjT4lIxF7jVXfp9Rx3s1LjBGxEKYGUN1jZu9K3kCp2NVWVki3ofIld H/6ICqWeMKAKXRC1K1HlsyjQV8UovOl/qT2E0EgCvFkWmtnQL7w9fJ6Zof/nkk95ve0B FrVw1arvKsBjAD8An+MUYEoZ3UHy/6/n+euV+VXnxFQWUggNKSAr3xrSoOWdmrKuk/W5 CsRg== X-Gm-Message-State: APjAAAVAnMotx1XcC8//2X2d+0eZl0wgE9iGt9A+ze/hXH5Ln2hxMM3a yJ7MFLz9jDSN6SVG/XchyWZ2kLDmPJgfh8v63U5hrAjnvN4= X-Google-Smtp-Source: APXvYqzaH0lC5Ph8t3EsceUcseVjaditLHPO0o8A2nTOuouDjJdA5idRDEfF8wwdJbG6iixWv+/WD1T0PaCVR5bZXBU= X-Received: by 2002:a92:6a0c:: with SMTP id f12mr29492215ilc.64.1570467739448; Mon, 07 Oct 2019 10:02:19 -0700 (PDT) MIME-Version: 1.0 References: <1570208647.1250.55.camel@oc5348122405> <20191004233052.28865.1609.stgit@localhost.localdomain> <1570241926.10511.7.camel@oc5348122405> <1570463459.1510.5.camel@oc5348122405> In-Reply-To: <1570463459.1510.5.camel@oc5348122405> From: Alexander Duyck Date: Mon, 7 Oct 2019 10:02:03 -0700 Message-ID: Subject: Re: [RFC PATCH] e1000e: Use rtnl_lock to prevent race conditions between net and pci/pm To: "David Z. Dai" Cc: Netdev , LKML , intel-wired-lan , Jeff Kirsher , zdai@us.ibm.com, David Miller Content-Type: text/plain; charset="UTF-8" Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Oct 7, 2019 at 8:51 AM David Z. Dai wrote: > > We have tested on one of the test box. > With this patch, it doesn't crash kernel anymore, which is good! > > However we see this warning message from the log file for irq number 0: > [10206.317270] Trying to free already-free IRQ 0 > > With this stack: > [10206.317344] NIP [c00000000018cbf8] __free_irq+0x308/0x370 > [10206.317346] LR [c00000000018cbf4] __free_irq+0x304/0x370 > [10206.317347] Call Trace: > [10206.317348] [c00000008b92b970] [c00000000018cbf4] __free_irq > +0x304/0x370 (unreliable) > [10206.317351] [c00000008b92ba00] [c00000000018cd84] free_irq+0x84/0xf0 > [10206.317358] [c00000008b92ba30] [d000000007449e60] e1000_free_irq > +0x98/0xc0 [e1000e] > [10206.317365] [c00000008b92ba60] [d000000007458a70] e1000e_pm_freeze > +0xb8/0x100 [e1000e] > [10206.317372] [c00000008b92baa0] [d000000007458b6c] > e1000_io_error_detected+0x34/0x70 [e1000e] > [10206.317375] [c00000008b92bad0] [c000000000040358] eeh_report_failure > +0xc8/0x190 > [10206.317377] [c00000008b92bb20] [c00000000003eb2c] eeh_pe_dev_traverse > +0x9c/0x170 > [10206.317379] [c00000008b92bbb0] [c000000000040d84] > eeh_handle_normal_event+0xe4/0x580 > [10206.317382] [c00000008b92bc60] [c000000000041330] eeh_handle_event > +0x30/0x340 > [10206.317384] [c00000008b92bd10] [c000000000041780] eeh_event_handler > +0x140/0x200 > [10206.317386] [c00000008b92bdc0] [c0000000001397c8] kthread+0x1a8/0x1b0 > [10206.317389] [c00000008b92be30] [c00000000000b560] > ret_from_kernel_thread+0x5c/0x7c > > Thanks! - David Hmm. I wonder if it is possibly calling the report e1000_io_error_detected multiple times. If so then the secondary calls to e1000_pm_freeze would cause issues. I will add a check so that we only down the interface and free the IRQs if the interface is in the present and running state. I'll submit an update patch shortly. Thanks. - Alex