From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jia-Ju Bai Subject: [BUG] renesas/sh_eth: two possible sleep-in-atomic bugs in sh_eth_set_link_ksettings and sh_eth_nway_reset Date: Wed, 13 Dec 2017 11:39:07 +0800 Message-ID: <45698118-3050-d1c5-4e48-c318d0cd164d@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Linux Kernel Mailing List To: sergei.shtylyov@cogentembedded.com, davem@davemloft.net, niklas.soderlund+renesas@ragnatech.se, geert+renesas@glider.be, laurent.pinchart@ideasonboard.com, horms+renesas@verge.net.au Return-path: Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Accoring to drivers/net/ethernet/renesas/sh_eth.c, the driver may sleep under a spinlock. The function call paths are: sh_eth_set_link_ksettings (acquire the spinlock) phy_ethtool_ksettings_set phy_start_aneg phy_start_aneg_priv mutex_lock --> may sleep sh_eth_nway_reset (acquire the spinlock) phy_start_aneg phy_start_aneg_priv mutex_lock --> may sleep I do not find a good way to fix them, so I only report. These possible bugs are found by my static analysis tool (DSAC) and checked by my code review. Thanks, Jia-Ju Bai