From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753860AbdLMVUh (ORCPT ); Wed, 13 Dec 2017 16:20:37 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:45450 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752908AbdLMVUe (ORCPT ); Wed, 13 Dec 2017 16:20:34 -0500 Date: Wed, 13 Dec 2017 16:20:32 -0500 (EST) Message-Id: <20171213.162032.129766742729458957.davem@davemloft.net> To: baijiaju1990@gmail.com 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 From: David Miller In-Reply-To: <1513158468-14382-1-git-send-email-baijiaju1990@gmail.com> References: <1513158468-14382-1-git-send-email-baijiaju1990@gmail.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 13 Dec 2017 13:20:34 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I want you to review all of your patches and resend them after you have checked them carefully. The first patch I even looked at, this one, is buggy. You changed a schedule_timeout_interruptible(1) into a udelay(10) That's not right. schedule_timeout_interruptible() takes a "jiffies" argument, which is a completely different unit than udelay() takes. You would have to scale the argument to udelay() in some way using HZ. Furthermore, the udelay argument you would come up with would be way too long to be appropirate in this atomic context. That's why the code tries to use a sleeping timeout, a long wait is necessary here.