Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1650867

Re: [PATCH net] sky2: Do not deadlock on sky2_hw_down

From Francois Romieu <romieu@fr.zoreil.com>
Newsgroups linux.kernel
Subject Re: [PATCH net] sky2: Do not deadlock on sky2_hw_down
Date 2017-05-26 00:10 +0200
Message-ID <tL97d-5CD-59@gated-at.bofh.it> (permalink)
References <tKNgl-8hc-5@gated-at.bofh.it> <tL53A-2KJ-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net] sky2: Do not deadlock on sky2_hw_down Joshua Emele <jemele@gmail.com> - 2017-05-25 00:50 +0200
  Re: [PATCH net] sky2: Do not deadlock on sky2_hw_down David Miller <davem@davemloft.net> - 2017-05-25 19:50 +0200
    Re: [PATCH net] sky2: Do not deadlock on sky2_hw_down Francois Romieu <romieu@fr.zoreil.com> - 2017-05-26 00:10 +0200
  Re: [PATCH net] sky2: Do not deadlock on sky2_hw_down Stephen Hemminger <stephen@networkplumber.org> - 2017-05-25 20:00 +0200
    Re: [PATCH net] sky2: Do not deadlock on sky2_hw_down Joshua Emele <jemele@gmail.com> - 2017-05-25 22:30 +0200
      Re: [PATCH net] sky2: Do not deadlock on sky2_hw_down Stephen Hemminger <stephen@networkplumber.org> - 2017-05-26 00:10 +0200
        Re: [PATCH net] sky2: Do not deadlock on sky2_hw_down David Miller <davem@davemloft.net> - 2017-05-26 06:10 +0200
          Re: [PATCH net] sky2: Do not deadlock on sky2_hw_down Stephen Hemminger <stephen@networkplumber.org> - 2017-05-26 17:50 +0200

csiph-web