Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Christensen <drc@linux.vnet.ibm.com>
To: Michael Chan <michael.chan@broadcom.com>, davem@davemloft.net
Cc: netdev@vger.kernel.org, kuba@kernel.org, baptiste@arista.com
Subject: Re: [PATCH net] tg3: Fix soft lockup when tg3_reset_task() fails.
Date: Tue, 8 Sep 2020 09:55:46 -0700	[thread overview]
Message-ID: <726c3fa7-9090-d8d1-d9f0-97e9f4445033@linux.vnet.ibm.com> (raw)
In-Reply-To: <1599157734-16354-1-git-send-email-michael.chan@broadcom.com>

On 9/3/20 11:28 AM, Michael Chan wrote:
> If tg3_reset_task() fails, the device state is left in an inconsistent
> state with IFF_RUNNING still set but NAPI state not enabled.  A
> subsequent operation, such as ifdown or AER error can cause it to
> soft lock up when it tries to disable NAPI state.
> 
> Fix it by bringing down the device to !IFF_RUNNING state when
> tg3_reset_task() fails.  tg3_reset_task() running from workqueue
> will now call tg3_close() when the reset fails.  We need to
> modify tg3_reset_task_cancel() slightly to avoid tg3_close()
> calling cancel_work_sync() to cancel tg3_reset_task().  Otherwise
> cancel_work_sync() will wait forever for tg3_reset_task() to
> finish.
> 
> Reported-by: David Christensen <drc@linux.vnet.ibm.com>
> Reported-by: Baptiste Covolato <baptiste@arista.com>
> Fixes: db2199737990 ("tg3: Schedule at most one tg3_reset_task run")
> Signed-off-by: Michael Chan <michael.chan@broadcom.com>

Thanks for the patch, I'll have some test time scheduled and let you know.

Dave

  parent reply	other threads:[~2020-09-08 16:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 18:28 Michael Chan
2020-09-03 19:24 ` David Miller
2020-09-04 23:20 ` Baptiste Covolato
2020-09-05  9:02   ` Michael Chan
2020-09-10 23:00     ` Baptiste Covolato
2020-09-08 16:55 ` David Christensen [this message]
2020-10-07 16:54 Tomas Charvat

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=726c3fa7-9090-d8d1-d9f0-97e9f4445033@linux.vnet.ibm.com \
    --to=drc@linux.vnet.ibm.com \
    --cc=baptiste@arista.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [PATCH net] tg3: Fix soft lockup when tg3_reset_task() fails.' \
    /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

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).