Re: 2.6.15-rc5-mm3 -- BUG: using smp_processor_id() in preemptible [00000001] code: swapper/1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew Morton <[email protected]> wrote:
>
> > Here's the BUG output:
>  > 
>  > [4294671.538000] Freeing unused kernel memory: 220k freed
>  > [4294671.538000] BUG: using smp_processor_id() in preemptible
>  > [00000001] code: swapper/1
>  > [4294671.539000] caller is mod_page_state_offset+0x12/0x28
>  > [4294671.539000]  [<c1003723>] dump_stack+0x16/0x1a
>  > [4294671.539000]  [<c110c1eb>] debug_smp_processor_id+0x77/0x90
>  > [4294671.539000]  [<c10413d3>] mod_page_state_offset+0x12/0x28

This'll plug the above.

Nick, please turn on the nice debugging options in future?


diff -puN mm/page_alloc.c~mm-page_state-opt-fix mm/page_alloc.c
--- devel/mm/page_alloc.c~mm-page_state-opt-fix	2005-12-15 00:50:56.000000000 -0800
+++ devel-akpm/mm/page_alloc.c	2005-12-15 00:51:07.000000000 -0800
@@ -1389,8 +1389,8 @@ void mod_page_state_offset(unsigned long
 	unsigned long flags;
 	void *ptr;
 
-	ptr = &__get_cpu_var(page_states);
 	local_irq_save(flags);
+	ptr = &__get_cpu_var(page_states);
 	*(unsigned long *)(ptr + offset) += delta;
 	local_irq_restore(flags);
 }
_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux