]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ia64/kernel/kprobes.c
Merge branch 'for-linus' of git://linux-nfs.org/~bfields/linux
[linux-2.6-omap-h63xx.git] / arch / ia64 / kernel / kprobes.c
index fc4d2676264f363d766ce4d9b6c5f76176fd4cb4..b618487cdc858b836cee4adb044579bb5cb716f4 100644 (file)
@@ -381,9 +381,10 @@ static void __kprobes save_previous_kprobe(struct kprobe_ctlblk *kcb)
 static void __kprobes restore_previous_kprobe(struct kprobe_ctlblk *kcb)
 {
        unsigned int i;
-       i = atomic_sub_return(1, &kcb->prev_kprobe_index);
-       __get_cpu_var(current_kprobe) = kcb->prev_kprobe[i].kp;
-       kcb->kprobe_status = kcb->prev_kprobe[i].status;
+       i = atomic_read(&kcb->prev_kprobe_index);
+       __get_cpu_var(current_kprobe) = kcb->prev_kprobe[i-1].kp;
+       kcb->kprobe_status = kcb->prev_kprobe[i-1].status;
+       atomic_sub(1, &kcb->prev_kprobe_index);
 }
 
 static void __kprobes set_current_kprobe(struct kprobe *p,