Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753161AbdFVKxM (ORCPT ); Thu, 22 Jun 2017 06:53:12 -0400 Received: from m12-15.163.com ([220.181.12.15]:44383 "EHLO m12-15.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753107AbdFVKxJ (ORCPT ); Thu, 22 Jun 2017 06:53:09 -0400 Subject: Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct To: Dan Carpenter , Kalle Valo Cc: David Miller , manish.chopra@cavium.com, rahul.verma@cavium.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1497840533-4894-1-git-send-email-baijiaju1990@163.com> <20170620.133530.1607963470682255531.davem@davemloft.net> <87d19xooo0.fsf@purkki.adurom.net> <594A131F.9040300@163.com> <8737atv4pm.fsf@kamboji.qca.qualcomm.com> <20170622060809.jvnuewiicuwtlzb4@mwanda> From: Jia-Ju Bai Message-ID: Date: Thu, 22 Jun 2017 18:52:45 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170622060809.jvnuewiicuwtlzb4@mwanda> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-CM-TRANSID: D8CowACXm09+oUtZoyqYMw--.12547S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7GFyfAr4rGF13tFW5Cry5XFb_yoW3Krb_u3 90qF1ft3yvgrs3ur4jkFnxur9FyFWkZFWvyrWFqr1xGryYvFW3WFnrW34fuFyfJr1UXwsx uwn0gr1fuw4UZjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU5TKZJUUUUU== X-Originating-IP: [183.172.146.53] X-CM-SenderInfo: xedlyx5dmximizq6il2tof0z/1tbiThL+elUCyiGcsAABsJ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 867 Lines: 25 On 2017/6/22 14:08, Dan Carpenter wrote: > We should probably add a might_sleep() to ioremap() to prevent these > bugs in the future. I think it is right to do this. And it will be very useful to summarize common kernel interface functions which may sleep into a list. When writing a new driver, the developer can refer to this list to reduce or avoid sleep-in-atomic bugs. > > This bug is eight years old. You can report it, but it's going to hard > to get anyone to fix it. I sometimes ignore ancient bugs. On the other > hand, netxen is fairly well supported so it doesn't hurt to try. > > I try to report bugs as soon as they are introduced. I report it to > the author and CC the relevant list. If people don't respond to my > email after a month then I complain again. > > regards, > dan carpenter > Thanks for your helpful advice. Thanks, Jia-Ju Bai