netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: gpiccoli@linux.vnet.ibm.com
Cc: netdev@vger.kernel.org, atul.gupta@chelsio.com,
	ganeshgr@chelsio.com, swise@chelsio.com
Subject: Re: [PATCH net] cxgb4: fix BUG() on interrupt deallocating path of ULD
Date: Tue, 11 Jul 2017 13:40:57 -0700 (PDT)	[thread overview]
Message-ID: <20170711.134057.496510914490251148.davem@davemloft.net> (raw)
In-Reply-To: <20170710135546.350-1-gpiccoli@linux.vnet.ibm.com>

From: "Guilherme G. Piccoli" <gpiccoli@linux.vnet.ibm.com>
Date: Mon, 10 Jul 2017 10:55:46 -0300

> Since the introduction of ULD (Upper-Layer Drivers), the MSI-X
> deallocating path changed in cxgb4: the driver frees the interrupts
> of ULD when unregistering it or on shutdown PCI handler.
> 
> Problem is that if a MSI-X is not freed before deallocated in the PCI
> layer, it will trigger a BUG() due to still "alive" interrupt being
> tentatively quiesced.
> 
> The below trace was observed when doing a simple unbind of Chelsio's
> adapter PCI function, like:
>   "echo 001e:80:00.4 > /sys/bus/pci/drivers/cxgb4/unbind"
> 
> Trace:
> 
>   kernel BUG at drivers/pci/msi.c:352!
>   Oops: Exception in kernel mode, sig: 5 [#1]
>   ...
>   NIP [c0000000005a5e60] free_msi_irqs+0xa0/0x250
>   LR [c0000000005a5e50] free_msi_irqs+0x90/0x250
>   Call Trace:
>   [c0000000005a5e50] free_msi_irqs+0x90/0x250 (unreliable)
>   [c0000000005a72c4] pci_disable_msix+0x124/0x180
>   [d000000011e06708] disable_msi+0x88/0xb0 [cxgb4]
>   [d000000011e06948] free_some_resources+0xa8/0x160 [cxgb4]
>   [d000000011e06d60] remove_one+0x170/0x3c0 [cxgb4]
>   [c00000000058a910] pci_device_remove+0x70/0x110
>   [c00000000064ef04] device_release_driver_internal+0x1f4/0x2c0
>   ...
> 
> This patch fixes the issue by refactoring the shutdown path of ULD on
> cxgb4 driver, by properly freeing and disabling interrupts on PCI
> remove handler too.
> 
> Fixes: 0fbc81b3ad51 ("Allocate resources dynamically for all cxgb4 ULD's")
> Reported-by: Harsha Thyagaraja <hathyaga@in.ibm.com>
> Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>

Applied and queued up for -stable, thanks.

      reply	other threads:[~2017-07-11 20:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-10 13:55 [PATCH net] cxgb4: fix BUG() on interrupt deallocating path of ULD Guilherme G. Piccoli
2017-07-11 20:40 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170711.134057.496510914490251148.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=atul.gupta@chelsio.com \
    --cc=ganeshgr@chelsio.com \
    --cc=gpiccoli@linux.vnet.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=swise@chelsio.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).