From patchwork Fri May 20 15:39:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 9129845 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DEFF960221 for ; Fri, 20 May 2016 15:39:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D12F820499 for ; Fri, 20 May 2016 15:39:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5E97279C4; Fri, 20 May 2016 15:39:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_TVD_MIME_EPI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04FA020499 for ; Fri, 20 May 2016 15:39:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756205AbcETPjk (ORCPT ); Fri, 20 May 2016 11:39:40 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:35353 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753719AbcETPjj (ORCPT ); Fri, 20 May 2016 11:39:39 -0400 Received: by mail-oi0-f68.google.com with SMTP id w198so24545101oiw.2 for ; Fri, 20 May 2016 08:39:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to; bh=a4hBVbY59kT7BtweRe8UfGspc0B70pMlZkGgyYeVPGw=; b=fbqCWzs7hpDlPpstf3yy2iNOBXcNkhRAM2Niz8IPh8J1CZIJbCGW//AETW7iqIvSv8 S7UgRZa/S4uzwtFNIarQX5wnhrOWRGweNyxPGAigHHNhkzlZqPP9kHNo20gh4FZtfD4Z 9J99mO6V6XfXqTv5vn26PUeqUkwbdVoyLyeNojLUXI0fHD7TePWEnKjUPOq29h5Hc6gv 32dG7tuH/Gn1Uz+hwVmPpVH7xv8POOb3JsXjo6mxySWDefSRRfLDXjdUd1OAgT6nICF1 GjCSq4iuSi32nAhRssPOshZJZSBnmHf5dXYCnELdI1sdvuAF9aQU0/oxrL4wOWpzLjxy Y9TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to; bh=a4hBVbY59kT7BtweRe8UfGspc0B70pMlZkGgyYeVPGw=; b=PaH2i27Ly4FMzNs22kfXjl7ZWr/yc9Di7BPkHl+IE6E3PY6WF1vZOsa2tf1trJWraf C7+IxB0wJzDzJGdWmJNge7FVCdIAhBcODFmgHTZMc4mYzFHtlHbNjLqD5oPnpHf9y3b3 rh+p9svd0yO9xL6rVs2/Za80R9mzMHhGKrHcRNr2JJA66x30+hEqzET6fTsyw4pMPVsN 21E2vsw0f56K7gtxfJ5amUOlHfpGVe4kV6JaN44y16jMGdhRm+yb6ERjObRbWHphWmp3 cKfRBLw7+9IPrTNdIHR/HbVCqIK9SZmvjJTHbF5BWo5ccvFzkLtWFN8187SRPB9TbINB H5bQ== X-Gm-Message-State: AOPr4FWqbEycc45la9fPhbHgYYuhMbLqFYKhU2YKrfAttVdX9dkY1C7HN+JcSlxCPMZMrA== X-Received: by 10.202.237.212 with SMTP id l203mr2454209oih.50.1463758773271; Fri, 20 May 2016 08:39:33 -0700 (PDT) Received: from linux.site (cpe-24-31-249-175.kc.res.rr.com. [24.31.249.175]) by smtp.gmail.com with ESMTPSA id il4sm5633932obb.3.2016.05.20.08.39.32 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 May 2016 08:39:32 -0700 (PDT) Subject: Re: "kernel: BUG: scheduling while atomic:" errors with linux kernel 4.6 To: Bob Copeland , James Feeney References: <20160519225612.GB12028@localhost> Cc: hostap@lists.infradead.org, linux-wireless@vger.kernel.org From: Larry Finger Message-ID: <573F2FB3.6090206@lwfinger.net> Date: Fri, 20 May 2016 10:39:31 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <20160519225612.GB12028@localhost> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 05/19/2016 05:56 PM, Bob Copeland wrote: > +linux-wireless > > On Thu, May 19, 2016 at 03:11:16PM -0600, James Feeney wrote: >> Arch linux 4.6-1 >> wpa_supplicant 1:2.5-3 >> Toshiba Satellite, circa 2011, with a Pentium Dual-Core Mobile >> Error is not seen on other machines. >> >> kernel: BUG: scheduling while atomic: wpa_supplicant/375/0x00000002 > > This is a kernel bug, not a wpa_supplicant bug. The linux-wireless mailing > list would be a more appropriate venue for this bug report. > > >> May 19 10:26:07 lapis kernel: BUG: scheduling while atomic: wpa_supplicant/627/0x00000002 > [...] >> May 19 10:26:07 lapis kernel: [] __schedule+0x899/0xad0 >> May 19 10:26:07 lapis kernel: [] schedule+0x3c/0x90 >> May 19 10:26:07 lapis kernel: [] schedule_hrtimeout_range_clock+0xa2/0x120 >> May 19 10:26:07 lapis kernel: [] ? hrtimer_init+0x120/0x120 >> May 19 10:26:07 lapis kernel: [] ? schedule_hrtimeout_range_clock+0x96/0x120 >> May 19 10:26:07 lapis kernel: [] schedule_hrtimeout_range+0x13/0x20 >> May 19 10:26:07 lapis kernel: [] usleep_range+0x4f/0x70 >> May 19 10:26:07 lapis kernel: [] rtl_rfreg_delay+0x38/0x50 [rtlwifi] >> May 19 10:26:07 lapis kernel: [] rtl92c_phy_config_rf_with_headerfile+0xc7/0xe0 [rtl8192ce] > > [Probably due to this kernel change: > > commit 49f86ec21c01b654f6ec47f2f4567f4f9ebaa26b > Author: Larry Finger > Date: Mon Feb 15 16:12:07 2016 -0600 > > rtlwifi: Change long delays to sleeps > > > ...apparently this function isn't in sleepable context after all.] > @James: Please run the command "dmesg | grep rtl_rfreg_delay". Do any of the resulting lines show a value other than "+0x38" for the offset? If that is the only one, the attached patch should fix the problem. Thanks, Larry diff --git a/Makefile b/Makefile index 0f9cb36..080962b 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION = 4 -PATCHLEVEL = 6 +PATCHLEVEL = 7 SUBLEVEL = 0 -EXTRAVERSION = +EXTRAVERSION = rc1 NAME = Charred Weasel # *DOCUMENTATION* diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c index 0f48048..2fc0e26 100644 --- a/drivers/net/wireless/realtek/rtlwifi/core.c +++ b/drivers/net/wireless/realtek/rtlwifi/core.c @@ -75,7 +75,7 @@ void rtl_rfreg_delay(struct ieee80211_hw *hw, enum radio_path rfpath, u32 addr, rtl_addr_delay(addr); } else { rtl_set_rfreg(hw, rfpath, addr, mask, data); - usleep_range(1, 2); + udelay(1); } } EXPORT_SYMBOL(rtl_rfreg_delay);