From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] hippi: Fix a Fix a possible sleep-in-atomic bug in rr_close Date: Wed, 13 Dec 2017 14:53:19 -0500 (EST) Message-ID: <20171213.145319.1650448955612362760.davem@davemloft.net> References: <1513068592-23632-1-git-send-email-baijiaju1990@163.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: jes@trained-monkey.org, jes@wildopensource.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: baijiaju1990@163.com Return-path: In-Reply-To: <1513068592-23632-1-git-send-email-baijiaju1990@163.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Jia-Ju Bai Date: Tue, 12 Dec 2017 16:49:52 +0800 > The driver may sleep under a spinlock. > The function call path is: > rr_close (acquire the spinlock) > free_irq --> may sleep > > To fix it, free_irq is moved to the place without holding the spinlock. > > This bug is found by my static analysis tool(DSAC) and checked by my code review. > > Signed-off-by: Jia-Ju Bai Applied.