On Tuesday 2010-04-20 15:18, Patrick McHardy wrote: > >I just noticed a problem with this patch: > >[ 428.295752] BUG: sleeping function called from invalid context at >mm/slub.c:1705 >[ 428.295762] in_atomic(): 1, irqs_disabled(): 0, pid: 9111, name: iptables >[ 428.295771] Pid: 9111, comm: iptables Not tainted 2.6.34-rc1 #2 >[ 428.295776] Call Trace: >[ 428.295791] [<c012138e>] __might_sleep+0xe5/0xed >[ 428.295801] [<c019e8ca>] __kmalloc+0x92/0xfc >[ 428.295825] [<f865b3bb>] ? xt_jumpstack_alloc+0x36/0xff [x_tables] >[ 428.295839] [<f865b3bb>] xt_jumpstack_alloc+0x36/0xff [x_tables] > >You probably shouldn't be allocating the jumpstack while BHs are >disabled. The following patch should address this. It's easily movable as it only does work on newinfo itself. The following changes since commit 6c79bf0f2440fd250c8fce8d9b82fcf03d4e8350: Bart De Schuymer (1): netfilter: bridge-netfilter: fix refragmenting IP traffic encapsulated in PPPoE traffic are available in the git repository at: git://dev.medozas.de/linux master Jan Engelhardt (1): netfilter: x_tables: move sleeping allocation outside BH-disabled region net/netfilter/x_tables.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) parent 6c79bf0f2440fd250c8fce8d9b82fcf03d4e8350 (v2.6.34-rc3-1335-g6c79bf0) commit 3109d6b7342a5c8bf23697a86be12e733472d820 Author: Jan Engelhardt <jengelh@xxxxxxxxxx> Date: Tue Apr 20 20:11:15 2010 +0200 netfilter: x_tables: move sleeping allocation outside BH-disabled region The jumpstack allocation needs to be moved out of the critical region. Corrects this notice: BUG: sleeping function called from invalid context at mm/slub.c:1705 [ 428.295762] in_atomic(): 1, irqs_disabled(): 0, pid: 9111, name: iptables [ 428.295771] Pid: 9111, comm: iptables Not tainted 2.6.34-rc1 #2 [ 428.295776] Call Trace: [ 428.295791] [<c012138e>] __might_sleep+0xe5/0xed [ 428.295801] [<c019e8ca>] __kmalloc+0x92/0xfc [ 428.295825] [<f865b3bb>] ? xt_jumpstack_alloc+0x36/0xff [x_tables] Signed-off-by: Jan Engelhardt <jengelh@xxxxxxxxxx> --- net/netfilter/x_tables.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 3ae3234..445de70 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -801,6 +801,12 @@ xt_replace_table(struct xt_table *table, struct xt_table_info *private; int ret; + ret = xt_jumpstack_alloc(newinfo); + if (ret < 0) { + *error = ret; + return NULL; + } + /* Do the substitution. */ local_bh_disable(); private = table->private; @@ -814,12 +820,6 @@ xt_replace_table(struct xt_table *table, return NULL; } - ret = xt_jumpstack_alloc(newinfo); - if (ret < 0) { - *error = ret; - return NULL; - } - table->private = newinfo; newinfo->initial_entries = private->initial_entries; -- # Created with git-export-patch -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html