From: Eric Dumazet Date: Sun, 20 Mar 2011 14:40:06 +0000 (+0100) Subject: netfilter: xtables: fix reentrancy X-Git-Tag: v2.6.39-rc1~390^2~13^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db856674ac69e31946e56085239757cca3f7655f;p=pandora-kernel.git netfilter: xtables: fix reentrancy commit f3c5c1bfd4308 (make ip_tables reentrant) introduced a race in handling the stackptr restore, at the end of ipt_do_table() We should do it before the call to xt_info_rdunlock_bh(), or we allow cpu preemption and another cpu overwrites stackptr of original one. A second fix is to change the underflow test to check the origptr value instead of 0 to detect underflow, or else we allow a jump from different hooks. Signed-off-by: Eric Dumazet Cc: Jan Engelhardt Signed-off-by: Patrick McHardy --- Reading git-diff-tree failed