From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751914AbbJMSZ5 (ORCPT ); Tue, 13 Oct 2015 14:25:57 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:57993 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751420AbbJMSZy (ORCPT ); Tue, 13 Oct 2015 14:25:54 -0400 Subject: Re: [4.1.3-rt8] [report][cpuhotplug] BUG: spinlock bad magic on CPU#0, sh/137 To: Thomas Gleixner References: <5617CE6D.9060800@ti.com> CC: , David Miller , , Eric Dumazet , From: Grygorii Strashko Message-ID: <561D4CA4.1010207@ti.com> Date: Tue, 13 Oct 2015 21:25:40 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/12/2015 11:16 AM, Thomas Gleixner wrote: > On Fri, 9 Oct 2015, Grygorii Strashko wrote: >> I can constantly see below error report with 4.1 RT-kernel on TI ARM dra7-evm >> if I'm trying to unplug cpu1: >> >> [ 57.737589] CPU1: shutdown >> [ 57.767537] BUG: spinlock bad magic on CPU#0, sh/137 >> [ 57.767546] lock: 0xee994730, .magic: 00000000, .owner: /-1, .owner_cpu: 0 > >> It looks like this backtrace was introduces by >> >> commit 91df05da13a6c6c358e71182e80f19f3c48d1615 >> net: Use skbufhead with raw lock >> >> I see the potential fix for this issue as below: >> >> index 4969c0d..f8c23de 100644 >> --- a/net/core/dev.c >> +++ b/net/core/dev.c >> @@ -7217,7 +7217,7 @@ static int dev_cpu_callback(struct notifier_block *nfb, >> netif_rx_ni(skb); >> input_queue_head_incr(oldsd); >> } >> - while ((skb = skb_dequeue(&oldsd->input_pkt_queue))) { >> + while ((skb = __skb_dequeue(&oldsd->input_pkt_queue))) { > > Your patch is white space damaged .... > >> netif_rx_ni(skb); >> input_queue_head_incr(oldsd); >> } >> >> input_pkt_queue is per-cpu queue and at this moment cpu is dead already, >> so no one should touch it. But I'm not sure if my assumption is correct. > > It is. Picking it up for the next release > Thanks & Sorry. I've not expected this diff/hack to be applied as patch :( -- regards, -grygorii