From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: 2.6.15-rc2-mm1 Date: Wed, 23 Nov 2005 11:22:18 -0800 Message-ID: <20051123112218.73f68926.akpm@osdl.org> References: <20051123033550.00d6a6e8.akpm@osdl.org> <6bffcb0e0511230615y7531e268n@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, Harald Welte , netdev@vger.kernel.org Return-path: To: Michal Piotrowski In-Reply-To: <6bffcb0e0511230615y7531e268n@mail.gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Michal Piotrowski wrote: > > Debug: sleeping function called from invalid context at > include/asm/semaphore.h:123 > in_atomic():1, irqs_disabled():0 > [] dump_stack+0x17/0x19 > [] __might_sleep+0x9c/0xae > [] translate_table+0x147/0xc14 [ip_tables] > [] ipt_register_table+0x93/0x20d [ip_tables] > [] init+0x27/0x9e [iptable_filter] > [] sys_init_module+0xd7/0x26c > [] sysenter_past_esp+0x54/0x75 > --------------------------- > | preempt count: 00000001 ] > | 1 level deep critical section nesting: > ---------------------------------------- > .. [] .... ipt_register_table+0x33/0x20d [ip_tables] > .....[] .. ( <= init+0x27/0x9e [iptable_filter]) > ipt_register_table() does get_cpu() then calls translate_table(), and somewhere under translate_table() we do something which sleeps, only I'm not sure what it is - netfilter likes to hide things in unexpected places. check_entry() will do sleepy things under that get_cpu(), but that doesn't seem to be in this particular call chain. Anyway, the new get_cpu() in ipt_register_table() is the problem.