mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Francois Romieu <romieu@fr.zoreil.com>
To: David Miller <davem@davemloft.net>
Cc: jemele@gmail.com, netdev@vger.kernel.org, jemele@google.com,
	mlindner@marvell.com, stephen@networkplumber.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] sky2: Do not deadlock on sky2_hw_down
Date: Fri, 26 May 2017 00:05:20 +0200	[thread overview]
Message-ID: <20170525220520.GA4706@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <20170525.134205.884395652948196578.davem@davemloft.net>

David Miller <davem@davemloft.net> :
> From: Joshua Emele <jemele@gmail.com>
> Date: Wed, 24 May 2017 15:43:18 -0700
[...]
> > The sky2_hw_down uses sky2_tx_complete to free pending frames stuck in
> > the HW queue. Because sky2_hw_down can be called from a process context,
> > the call to u64_stats_update_begin can result in deadlock.
> > 
> > Because the statistics do not require update as part of the sky2_hw_down
> > sequence, prevent the update to avoid the deadlock.
> 
> I disagree.  Taking the interface down should cause events in the
> statistics to be lost.
>
> You're going to have to find a way to fix this without eliding
> the stats increments.

NAPI processing is already disabled at this stage in the device close()
path (and sky2_netpoll() uses napi_schedule).

It's possible to add a conditionnal bh or irq disabling instruction to
silent the warning but it should not be needed at all.

-- 
Ueimor

  reply	other threads:[~2017-05-25 22:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-24 22:43 Joshua Emele
2017-05-25 17:42 ` David Miller
2017-05-25 22:05   ` Francois Romieu [this message]
2017-05-25 17:54 ` Stephen Hemminger
2017-05-25 20:21   ` Joshua Emele
2017-05-25 22:05     ` Stephen Hemminger
2017-05-26  3:58       ` David Miller
2017-05-26 15:43         ` Stephen Hemminger

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=20170525220520.GA4706@electric-eye.fr.zoreil.com \
    --to=romieu@fr.zoreil.com \
    --cc=davem@davemloft.net \
    --cc=jemele@gmail.com \
    --cc=jemele@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mlindner@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /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

Powered by JetHome