public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@mvista.com>
To: mingo@elte.hu
Cc: linux-kernel@vger.kernel.org
Cc: a.p.zijlstra@chello.nl
Subject: [PATCH -rt] scheduling while atomic in remove_proc_entry()
Date: Fri, 29 Dec 2006 13:12:37 -0800	[thread overview]
Message-ID: <20061229211237.690413000@mvista.com> (raw)

Found this in 2.6.20-rc2-rt3 w/ PREEMPT_RT off on x86_64,

BUG: scheduling while atomic: swapper/0x00000001/1, CPU#0

Call Trace:
 [<ffffffff813470c0>] __sched_text_start+0xb0/0x85a
 [<ffffffff8102e9ec>] try_to_wake_up+0x3fc/0x420
 [<ffffffff81062ebb>] add_preempt_count+0x2b/0x130
 [<ffffffff81347b75>] schedule+0xe5/0x110
 [<ffffffff81047ced>] flush_cpu_workqueue+0x8d/0xd0
 [<ffffffff8104b8a0>] autoremove_wake_function+0x0/0x40
 [<ffffffff8108b670>] filevec_add_drain_per_cpu+0x0/0x80
 [<ffffffff81047da3>] flush_workqueue+0x73/0xa0
 [<ffffffff8104871a>] schedule_on_each_cpu_wq+0xea/0x110
 [<ffffffff81062ebb>] add_preempt_count+0x2b/0x130
 [<ffffffff8108ba07>] filevec_add_drain_all+0x17/0x20
 [<ffffffff810c8da0>] remove_proc_entry+0xb0/0x230
 [<ffffffff810659cd>] unregister_handler_proc+0x2d/0x60
 [<ffffffff81063f2c>] free_irq+0xfc/0x150
 [<ffffffff81274b3d>] i8042_probe+0x30d/0x610
 [<ffffffff811cff82>] platform_drv_probe+0x12/0x20
 [<ffffffff811ce1db>] really_probe+0x9b/0x140
 [<ffffffff811ce338>] driver_probe_device+0xb8/0xd0
 [<ffffffff811ce350>] __device_attach+0x0/0x10
 [<ffffffff811ce359>] __device_attach+0x9/0x10
 [<ffffffff811cd35c>] bus_for_each_drv+0x4c/0x90
 [<ffffffff811ce3ef>] device_attach+0x6f/0x90
 [<ffffffff811cd26e>] bus_attach_device+0x2e/0x70
 [<ffffffff811cbe38>] device_add+0x3d8/0x5b0
 [<ffffffff811d042f>] platform_device_add+0x13f/0x180
 [<ffffffff81597fb2>] i8042_init+0x72/0xb0
 [<ffffffff81007192>] init+0x172/0x3c0
 [<ffffffff8100add8>] child_rip+0xa/0x12
 [<ffffffff81007020>] init+0x0/0x3c0
 [<ffffffff8100adce>] child_rip+0x0/0x12

---------------------------
| preempt count: 00000001 ]
| 1-level deep critical section nesting:
----------------------------------------
. [<ffffffff8134a0a6>] .... __spin_lock+0x16/0x80
....[<ffffffff810c8d3b>] ..   ( <= remove_proc_entry+0x4b/0x230)


Signed-Off-By: Daniel Walker <dwalker@mvista.com>

---
 fs/proc/generic.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6.19/fs/proc/generic.c
===================================================================
--- linux-2.6.19.orig/fs/proc/generic.c
+++ linux-2.6.19/fs/proc/generic.c
@@ -555,7 +555,6 @@ static void proc_kill_inodes(struct proc
 	/*
 	 * Actually it's a partial revoke().
 	 */
-	filevec_add_drain_all();
 	lock_list_for_each_entry(filp, &sb->s_files, f_u.fu_llist) {
 		struct dentry * dentry = filp->f_path.dentry;
 		struct inode * inode;
@@ -738,6 +737,8 @@ void remove_proc_entry(const char *name,
 		break;
 	}
 	spin_unlock(&proc_subdir_lock);
+
+	filevec_add_drain_all();
 out:
 	return;
 }
--

             reply	other threads:[~2006-12-29 21:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-29 21:12 Daniel Walker [this message]
2007-01-08 12:20 ` [PATCH -rt] scheduling while atomic in remove_proc_entry() Peter Zijlstra
2007-01-08 12:59   ` Daniel Walker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061229211237.690413000@mvista.com \
    --to=dwalker@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox