From patchwork Fri Feb 17 09:28:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 9579285 X-Patchwork-Delegate: johannes@sipsolutions.net 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 DDE9C6049F for ; Fri, 17 Feb 2017 09:28:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D73B428675 for ; Fri, 17 Feb 2017 09:28:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB4C92868A; Fri, 17 Feb 2017 09:28:14 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 5C3C728675 for ; Fri, 17 Feb 2017 09:28:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932452AbdBQJ2L (ORCPT ); Fri, 17 Feb 2017 04:28:11 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:55404 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755577AbdBQJ2K (ORCPT ); Fri, 17 Feb 2017 04:28:10 -0500 Received: from localhost ([127.0.0.1]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ceeod-00010j-RP; Fri, 17 Feb 2017 10:27:00 +0100 Date: Fri, 17 Feb 2017 10:28:03 +0100 (CET) From: Thomas Gleixner To: kernel test robot cc: Marc Zyngier , Greg Kroah-Hartman , Tomasz Nowicki , Christoffer Dall , Sasha Levin , "linux-wireless@vger.kernel.org" , Johannes Berg Subject: Re: [linux-stable] 4fc2942b6e kernel BUG at kernel/time/hrtimer.c:109! In-Reply-To: <20170217052607.glbumukvoz4pilvt@wfg-t540p.sh.intel.com> Message-ID: References: <20170217052607.glbumukvoz4pilvt@wfg-t540p.sh.intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 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 Fri, 17 Feb 2017, kernel test robot wrote: > Hi Marc, > > We find this oops in linux-4.4.y. The gcc-6 compiled mainline kernel is fine. > > commit 4fc2942b6e2de2efc8a9d3784d4b0d3543149613 > hrtimer: Catch illegal clockids And that commit is doing what the subject line says. Catch illegal usage. > [ 38.101342] Call Trace: > [ 38.101342] Call Trace: > [ 38.102045] [] tasklet_hrtimer_init+0x16/0x52 > [ 38.102045] [] tasklet_hrtimer_init+0x16/0x52 > [ 38.103698] [] mac80211_hwsim_new_radio+0x766/0x84d The real bug is in this code: drivers/net/wireless/mac80211_hwsim.c mac80211_hwsim_new_radio() tasklet_hrtimer_init(&data->beacon_timer, mac80211_hwsim_beacon, CLOCK_MONOTONIC_RAW, HRTIMER_MODE_ABS); CLOCK_MONOTONIC_RAW is not a supported clockid for hrtimers. Sigh. Fix below. Thanks, tglx 8<------------------ Acked-by: Marc Zyngier diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 0cd95120bc78..da363ec91a1c 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -2535,9 +2535,8 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, data->debugfs, data, &hwsim_simulate_radar); - tasklet_hrtimer_init(&data->beacon_timer, - mac80211_hwsim_beacon, - CLOCK_MONOTONIC_RAW, HRTIMER_MODE_ABS); + tasklet_hrtimer_init(&data->beacon_timer, mac80211_hwsim_beacon, + CLOCK_MONOTONIC, HRTIMER_MODE_ABS); spin_lock_bh(&hwsim_radio_lock); list_add_tail(&data->list, &hwsim_radios);