Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[pandora-kernel.git] / drivers / oprofile / cpu_buffer.c
index efcbf4b..7ba78e6 100644 (file)
@@ -27,7 +27,7 @@
 #include "buffer_sync.h"
 #include "oprof.h"
 
-DEFINE_PER_CPU_SHARED_ALIGNED(struct oprofile_cpu_buffer, cpu_buffer);
+DEFINE_PER_CPU(struct oprofile_cpu_buffer, cpu_buffer);
 
 static void wq_sync_buffer(struct work_struct *work);
 
@@ -38,8 +38,10 @@ void free_cpu_buffers(void)
 {
        int i;
  
-       for_each_online_cpu(i)
+       for_each_online_cpu(i) {
                vfree(per_cpu(cpu_buffer, i).buffer);
+               per_cpu(cpu_buffer, i).buffer = NULL;
+       }
 }
 
 int alloc_cpu_buffers(void)