Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752340AbdLMDaB (ORCPT ); Tue, 12 Dec 2017 22:30:01 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:37842 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750749AbdLMD36 (ORCPT ); Tue, 12 Dec 2017 22:29:58 -0500 X-Google-Smtp-Source: ACJfBou3dcGQ/KlhrDFEtqXIGCnwVAbIh1iU7BwU+bRy7ooXiH5RaMS3PZ3ko7a8c2ZuDp3LaDDxrA== To: michael.chan@broadcom.com, hauke@hauke-m.de, David Miller , f.fainelli@gmail.com, opendmb@gmail.com, sathya.perla@broadcom.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org From: Jia-Ju Bai Subject: [BUG] b44: two possible sleep-in-atomic bugs in b44_set_link_ksettings and b44_ioctl Message-ID: <5299283f-95e6-61b5-267c-5e12ca72fe41@gmail.com> Date: Wed, 13 Dec 2017 11:29:46 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 499 Lines: 20 The driver may sleep under a spinlock. The function call paths are: b44_set_link_ksettings (acquire the spinlock) phy_ethtool_ksettings_set phy_start_aneg phy_start_aneg_priv mutex_lock --> may sleep b44_ioctl (acquire the spinlock) phy_mii_ioctl mdiobus_read 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