From: David Miller <davem@davemloft.net>
To: baijiaju1990@163.com
Cc: benve@cisco.com, _govind@gmx.com, neepatel@cisco.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] enic: Fix another sleep-in-atomic bug
Date: Wed, 31 May 2017 14:37:54 -0400 (EDT) [thread overview]
Message-ID: <20170531.143754.2086394817441343569.davem@davemloft.net> (raw)
In-Reply-To: <1496198620-1840-1-git-send-email-baijiaju1990@163.com>
From: Jia-Ju Bai <baijiaju1990@163.com>
Date: Wed, 31 May 2017 10:43:40 +0800
> The driver may sleep under a spin lock in some function call paths.
> The 1st function call path is:
> enic_tx_hang_reset (acquire the lock by spin_lock)
> enic_stop
> enic_synchronize_irqs
> synchronize_irq --> may sleep
> The 2nd function call path is:
> enic_tx_hang_reset (acquire the lock by spin_lock)
> enic_dev_wait
> schedule_timeout_uninterruptible --> may sleep
> The 3rd function call path is:
> enic_tx_hang_reset (acquire the lock by spin_lock)
> enic_open
> enic_request_intr
> enic_set_rx_cpu_rmap
> enic_free_rx_cpu_rmap
> free_irq_cpu_rmap --> may sleep
>
> To fix it, the "spin_lock" and "spin_unlock" are removed
> in enic_tx_hang_reset.
>
> Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
Likewise, you can't just blindly remove locks to fix a warning like
this.
prev parent reply other threads:[~2017-05-31 18:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-31 2:43 [PATCH] enic: Fix another sleep-in-atomic bug Jia-Ju Bai
2017-05-31 18:37 ` 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=20170531.143754.2086394817441343569.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=_govind@gmx.com \
--cc=baijiaju1990@163.com \
--cc=benve@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neepatel@cisco.com \
--cc=netdev@vger.kernel.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