From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jia-Ju Bai 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 Message-ID: References: <1513158468-14382-1-git-send-email-baijiaju1990@gmail.com> <20171213.162032.129766742729458957.davem@davemloft.net> <18472c42-4eaf-7189-a16f-489a706cba3e@gmail.com> <20171213.223432.393103915049464102.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: perex@perex.cz, floeff@mathematik.uni-stuttgart.de, acme@conectiva.com.br, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: David Miller Return-path: Received: from mail-pg0-f68.google.com ([74.125.83.68]:37926 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752141AbdLND5L (ORCPT ); Wed, 13 Dec 2017 22:57:11 -0500 In-Reply-To: <20171213.223432.393103915049464102.davem@davemloft.net> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: 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 > 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.