Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755060AbXEBLus (ORCPT ); Wed, 2 May 2007 07:50:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755092AbXEBLus (ORCPT ); Wed, 2 May 2007 07:50:48 -0400 Received: from mx1.redhat.com ([66.187.233.31]:35673 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755056AbXEBLur (ORCPT ); Wed, 2 May 2007 07:50:47 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Charlie Peters (USA) and David Owens (Ireland) From: David Howells To: dipankar@in.ibm.com, rusty@rustcorp.com.au, torvalds@osdl.org, akpm@osdl.org cc: linux-kernel@vger.kernel.org Subject: Race between RCU and rmmod X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.0.50 Date: Wed, 02 May 2007 12:50:24 +0100 Message-ID: <30958.1178106624@redhat.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2150 Lines: 46 Hi Dipankar, Rusty, I seem to have found a race between RCU and rmmod. What I see appears to be an RCU destructor function that has a call pending but lives in a module, gets deleted before the RCU callback is processed: RIP: 0010:[] [] RSP: 0018:ffffffff805a4f08 EFLAGS: 00010296 RAX: 0000000000000026 RBX: ffff81002fe53a38 RCX: 0000000000000026 RDX: ffff810001f730c0 RSI: 0000000000000001 RDI: 0000000000000002 RBP: ffffffff805a4f18 R08: 0000000000000002 R09: ffffffff80228eab R10: ffffffff805a4c98 R11: ffffffff805a4e28 R12: ffff81003979e140 R13: 0000000000000001 R14: 0000000000000001 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffffffff80552000(0000) knlGS:0000000000000000 CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b CR2: ffffffff880329b7 CR3: 0000000000201000 CR4: 00000000000006e0 Process ksoftirqd/0 (pid: 3, threadinfo ffff81003e626000, task ffff810001f730c0) Stack: ffff81002fe53a38 ffff810001dc5040 ffffffff805a4f48 ffffffff8023946a ffff810001dc5140 0000000000000000 000000000000000a 0000000000000000 ffffffff805a4f58 ffffffff8023952c ffffffff805a4f78 ffffffff8022dca3 Call Trace: [] __rcu_process_callbacks+0x15d/0x1fc [] rcu_process_callbacks+0x23/0x44 [] tasklet_action+0x5e/0xb2 [] __do_softirq+0x5f/0xe3 [] ksoftirqd+0x0/0x91 [] call_softirq+0x1c/0x28 [] do_softirq+0x39/0x9f [] ksoftirqd+0x52/0x91 [] kthread+0xd8/0x10e [] child_rip+0xa/0x12 [] _spin_unlock_irq+0x2b/0x31 [] restore_args+0x0/0x30 [] kthread+0x0/0x10e [] child_rip+0x0/0x12 I think that rmmod needs to clear the RCU destructor queue, probably inside of __try_stop_module(). David - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/