From: David Miller <davem@davemloft.net>
To: likaige@loongson.cn
Cc: benve@cisco.com, _govind@gmx.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, lixuefeng@loongson.cn,
yangtiezhu@loongson.cn
Subject: Re: [PATCH RESEND] net/cisco: Fix a sleep-in-atomic-context bug in enic_init_affinity_hint()
Date: Tue, 23 Jun 2020 20:23:24 -0700 (PDT) [thread overview]
Message-ID: <20200623.202324.442008830004872069.davem@davemloft.net> (raw)
In-Reply-To: <7533075e-0e8e-2fde-c8fa-72e2ea222176@loongson.cn>
From: Kaige Li <likaige@loongson.cn>
Date: Wed, 24 Jun 2020 09:56:47 +0800
>
> On 06/24/2020 06:26 AM, David Miller wrote:
>> From: David Miller <davem@davemloft.net>
>> Date: Tue, 23 Jun 2020 14:33:11 -0700 (PDT)
>>
>>> Calling a NIC driver open function from a context holding a spinlock
>>> is very much the real problem, so many operations have to sleep and
>>> in face that ->ndo_open() method is defined as being allowed to sleep
>>> and that's why the core networking never invokes it with spinlocks
>> ^^^^
>>
>> I mean "without" of course. :-)
>>
>>> held.
>
> Did you mean that open function should be out of spinlock? If so, I
> will
> send V2 patch.
Yes, but only if that is safe.
You have to analyze the locking done by this driver and fix it properly.
I anticipate it is not just a matter of changing where the spinlock
is held, you will have to rearchitect things a bit.
next prev parent reply other threads:[~2020-06-24 3:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 8:13 Kaige Li
2020-06-23 20:50 ` Jakub Kicinski
2020-06-24 2:07 ` Kaige Li
2020-06-24 3:24 ` David Miller
2020-06-23 21:33 ` David Miller
2020-06-23 22:26 ` David Miller
2020-06-24 1:56 ` Kaige Li
2020-06-24 3:23 ` David Miller [this message]
2020-06-24 3:41 ` Kaige Li
2020-06-24 6:32 ` Christian Benvenuti (benve)
2020-06-24 16:59 ` Jakub Kicinski
2020-07-03 6:54 ` Kaige Li
-- strict thread matches above, loose matches on Subject: below --
2020-06-22 13:11 Kaige Li
2020-06-23 4:09 ` David Miller
2020-06-23 8:02 ` Kaige Li
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=20200623.202324.442008830004872069.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=_govind@gmx.com \
--cc=benve@cisco.com \
--cc=likaige@loongson.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=lixuefeng@loongson.cn \
--cc=netdev@vger.kernel.org \
--cc=yangtiezhu@loongson.cn \
/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
all inboxes | Powered by JetHome®