Masami Hiramatsu 829e924585 kprobes/x86: Fix removed int3 checking order
Fix kprobe/x86 to check removed int3 when failing to get kprobe
from hlist. Since we have a time window between checking int3
exists on probed address and getting kprobe on that address,
we can have following scenario:

 -------
 CPU1                     CPU2
 hit int3
 check int3 exists
                          remove int3
                          remove kprobe from hlist
 get kprobe from hlist
 no kprobe->OOPS!
 -------

This patch moves int3 checking if there is no kprobe on that
address for fixing this problem as follows:

 ------
 CPU1                     CPU2
 hit int3
                          remove int3
                          remove kprobe from hlist
 get kprobe from hlist
 no kprobe->check int3 exists
          ->rollback&retry
 ------

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
Cc: Dave Anderson <anderson@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20100427223348.2322.9112.stgit@localhost6.localdomain6>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-05-11 09:14:25 +02:00
..
2010-05-03 15:04:18 +02:00
2009-03-15 07:03:15 +01:00
2009-07-19 18:27:51 +02:00
2009-03-13 11:57:22 +01:00
2009-10-29 22:34:14 +09:00
2010-02-07 17:47:51 +01:00
2010-01-05 09:17:33 +09:00
2010-02-09 11:13:56 +01:00
2009-02-10 13:13:23 +01:00
2009-03-21 16:57:04 +05:30
2010-04-01 13:31:07 -07:00
2010-02-24 11:01:33 -08:00
2009-07-14 16:25:05 +02:00
2009-09-15 15:08:40 -04:00
2009-12-09 16:28:59 -08:00
2009-07-19 18:27:51 +02:00
2010-03-12 15:52:32 -08:00
2010-03-12 15:52:32 -08:00
2010-02-16 18:21:32 +01:00
2009-03-21 16:55:24 +05:30
2010-03-08 16:55:37 +01:00