netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jia-Ju Bai <baijiaju1990@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: perex@perex.cz, floeff@mathematik.uni-stuttgart.de,
	acme@conectiva.com.br, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] hp100: Fix a possible sleep-in-atomic bug in hp100_login_to_vg_hub
Date: Thu, 14 Dec 2017 11:56:59 +0800	[thread overview]
Message-ID: <dda22831-e9de-e9f0-ce4e-986b3a3219dc@gmail.com> (raw)
In-Reply-To: <20171213.223432.393103915049464102.davem@davemloft.net>

Sorry,

I think I know your meaning now.

Maybe we can unlock the spinlock before "schedule_timeout_interruptible" 
and then lock again?
Like:
     spin_unlock(...);
     schedule_timeout_interruptible(1);
     spin_lock(...);


Best wishes,
Jia-Ju Bai


On 2017/12/14 11:34, David Miller wrote:
> From: Jia-Ju Bai <baijiaju1990@gmail.com>
> Date: Thu, 14 Dec 2017 11:13:15 +0800
>
>> Thanks for reply :)
>> I think I should use "udelay(100000/HZ)" instead, do you think it is
>> right?
> The delay is too long, please do not ignore that part of my critique
> of your change.
>
> You cannot delay so long under a lock, that's why the code is trying
> to use a sleeping delay.
>
> I'm not going to explain this problem another time.

  reply	other threads:[~2017-12-14  3:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13  9:47 [PATCH 1/2] hp100: Fix a possible sleep-in-atomic bug in hp100_login_to_vg_hub Jia-Ju Bai
2017-12-13 21:20 ` David Miller
2017-12-14  3:13   ` Jia-Ju Bai
2017-12-14  3:31     ` Jia-Ju Bai
2017-12-14  3:34     ` David Miller
2017-12-14  3:56       ` Jia-Ju Bai [this message]
2017-12-15 11:13         ` Siegfried Loeffler
2017-12-14  1:21 ` Joe Perches

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=dda22831-e9de-e9f0-ce4e-986b3a3219dc@gmail.com \
    --to=baijiaju1990@gmail.com \
    --cc=acme@conectiva.com.br \
    --cc=davem@davemloft.net \
    --cc=floeff@mathematik.uni-stuttgart.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=perex@perex.cz \
    /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;
as well as URLs for NNTP newsgroup(s).