From: David Miller <davem@davemloft.net>
To: liu.xiang6@zte.com.cn
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
liuxiang_1999@126.com
Subject: Re: [PATCH v3] net: davicom: dm9000: Avoid spinlock recursion during dm9000_timeout routine
Date: Mon, 16 Apr 2018 11:05:01 -0400 (EDT) [thread overview]
Message-ID: <20180416.110501.92472500114183248.davem@davemloft.net> (raw)
In-Reply-To: <1523695834-6261-1-git-send-email-liu.xiang6@zte.com.cn>
From: Liu Xiang <liu.xiang6@zte.com.cn>
Date: Sat, 14 Apr 2018 16:50:34 +0800
> +static bool dm9000_current_in_timeout(struct board_info *db)
> +{
> + bool ret = false;
> +
> + preempt_disable();
> + ret = (db->timeout_cpu == smp_processor_id());
> + preempt_enable();
This doesn't work.
As soon as you do preempt_enable(), smp_processor_id() can change.
next prev parent reply other threads:[~2018-04-16 15:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-14 8:50 Liu Xiang
2018-04-16 15:05 ` David Miller [this message]
2018-04-18 13:48 ` liuxiang
2018-04-18 17:35 ` David Miller
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=20180416.110501.92472500114183248.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=liu.xiang6@zte.com.cn \
--cc=liuxiang_1999@126.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
all inboxes | Powered by JetHome®