Skip to contentSkip to conversation

omap4: 3.8: IPV6 + PREEMPT_VOLUNTARY + !DEBUG_[SPINLOCK|MUTEXES] = BUG()

DISCUSSION Paolo Pisati 2 participants 5 messages Feb 21, 2013 – Feb 26, 2013 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

I keep getting this BUG() when there's IPV6 traffic in in my lan on a panda board with these configs:

-start from a vanilla omap config
(make ARCH=arm omap2plus_defconfig)

-enable IPV6 and PREEMPT_VOLUNTARY

-turn off

CONFIG_DEBUG_SPINLOCK
CONFIG_DEBUG_MUTEXES
CONFIG_DEBUG_LOCK_ALLOC
CONFIG_PROVE_LOCKING
CONFIG_LOCKDEP
CONFIG_TRACE_IRQFLAGS

(or apply this patch fragment:
http://people.canonical.com/~ppisati/panda_ipv6/config_lock_off.patch)

-enable some useful options (like EHCI for my usb disk, etcetc)

-finish off the build

make ARCH=arm olddefconfig
make ARCH=arm zImage

-boot the board, wait for some ipv6 traffic:

IP6 fe80::213:20ff:fefb:6364.mdns > ff02::fb.mdns: 0 PTR (QM)? _mumble._tcp.local. (36)

and enjoy:

[Thu Feb 21 10:23:07 2013] BUG: scheduling while atomic: swapper/0/0/0x40000100
[Thu Feb 21 10:23:07 2013] Modules linked in:
[Thu Feb 21 10:23:07 2013] [<c001b1c4>] (unwind_backtrace+0x0/0xf0) from [<c0503c5c>] (__schedule_bug+0x48/0x5c)
[Thu Feb 21 10:23:07 2013] [<c0503c5c>] (__schedule_bug+0x48/0x5c) from [<c0508608>] (__schedule+0x700/0x740)
[Thu Feb 21 10:23:07 2013] [<c0508608>] (__schedule+0x700/0x740) from [<c007007c>] (__cond_resched+0x24/0x34)
[Thu Feb 21 10:23:07 2013] [<c007007c>] (__cond_resched+0x24/0x34) from [<c05086dc>] (_cond_resched+0x3c/0x44)
[Thu Feb 21 10:23:07 2013] [<c05086dc>] (_cond_resched+0x3c/0x44) from [<c0021f6c>] (do_alignment+0x178/0x78c)
[Thu Feb 21 10:23:07 2013] [<c0021f6c>] (do_alignment+0x178/0x78c) from [<c00083e0>] (do_DataAbort+0x34/0x98)
[Thu Feb 21 10:23:07 2013] [<c00083e0>] (do_DataAbort+0x34/0x98) from [<c0509a60>] (__dabt_svc+0x40/0x60)
[Thu Feb 21 10:23:07 2013] Exception stack(0xc0763d70 to 0xc0763db8)
[Thu Feb 21 10:23:07 2013] 3d60:                                     e97e805e e97e806e 2c000000 11000000
[Thu Feb 21 10:23:07 2013] 3d80: ea86bb00 0000002c 00000011 e97e807e c076d2a8 e97e805e e97e806e 0000002c
[Thu Feb 21 10:23:07 2013] 3da0: 3d000000 c0763dbc c04b98fc c02a8490 00000113 ffffffff
[Thu Feb 21 10:23:07 2013] [<c0509a60>] (__dabt_svc+0x40/0x60) from [<c02a8490>] (__csum_ipv6_magic+0x8/0xc8)

here you can find a .config for a 3.8 kernel showing this problem:

http://people.canonical.com/~ppisati/panda_ipv6/config

and a precompiled zImage:

http://people.canonical.com/~ppisati/panda_ipv6/zImage

any idea how can i debug this?

Signature · 2 lines
bye,
p.
#1 lore raw
Quoted 1 line · Paolo Pisati

any idea how can i debug this?

Please try this patch, and report back whether it solves your problem. Thanks.

 arch/arm/mm/alignment.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)
arch/arm/mm/alignment.c +4 -7
index b820eda..db26e2e 100644
@@ -749,7 +749,6 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
 	unsigned long instr = 0, instrptr;
 	int (*handler)(unsigned long addr, unsigned long instr, struct pt_regs *regs);
 	unsigned int type;
-	mm_segment_t fs;
 	unsigned int fault;
 	u16 tinstr = 0;
 	int isize = 4;
@@ -760,16 +759,15 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
 
 	instrptr = instruction_pointer(regs);
 
-	fs = get_fs();
-	set_fs(KERNEL_DS);
 	if (thumb_mode(regs)) {
-		fault = __get_user(tinstr, (u16 *)(instrptr & ~1));
+		u16 *ptr = (u16 *)(instrptr & ~1);
+		fault = probe_kernel_address(ptr, tinstr);
 		if (!fault) {
 			if (cpu_architecture() >= CPU_ARCH_ARMv7 &&
 			    IS_T32(tinstr)) {
 				/* Thumb-2 32-bit */
 				u16 tinst2 = 0;
-				fault = __get_user(tinst2, (u16 *)(instrptr+2));
+				fault = probe_kernel_address(ptr + 1, tinst2);
 				instr = (tinstr << 16) | tinst2;
 				thumb2_32b = 1;
 			} else {
@@ -778,8 +776,7 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
 			}
 		}
 	} else
-		fault = __get_user(instr, (u32 *)instrptr);
-	set_fs(fs);
+		fault = probe_kernel_address(instrptr, instr);
 
 	if (fault) {
 		type = TYPE_FAULT;
#2 lore raw
Quoted 5 lines · Russell King - ARM Linux
Quoted 1 line · Paolo Pisati

any idea how can i debug this?

Please try this patch, and report back whether it solves your problem. Thanks.

yes, it solves my problem: any chance we can see it in 3.9 or 3.8.x?

Signature · 2 lines
bye,
p.
#3 lore raw
Quoted 8 lines · Paolo Pisati
Quoted 5 lines · Russell King - ARM Linux
Quoted 1 line · Paolo Pisati

any idea how can i debug this?

Please try this patch, and report back whether it solves your problem. Thanks.

yes, it solves my problem: any chance we can see it in 3.9 or 3.8.x?

I was just looking to send a chase for this, because I'm about to remerge my tree and I wanted this patch committed.

Can I use your name and email address in the commit for the Reported-by and Tested-by tags (which will be published in the kernel repository) please? Thanks.

author Tested-by
#4 lore raw
Quoted 7 lines · Russell King - ARM Linux

I was just looking to send a chase for this, because I'm about to remerge my tree and I wanted this patch committed.

Can I use your name and email address in the commit for the Reported-by and Tested-by tags (which will be published in the kernel repository) please? Thanks.

absolutely:

Signature · 2 lines
bye,
p.