alistair23-linux/arch
Jim Keniston bce0649417 [PATCH] kprobes: fix handling of simultaneous probe hit/unregister
This patch fixes a bug in kprobes's handling of a corner case on i386 and
x86_64.  On an SMP system, if one CPU unregisters a kprobe just after
another CPU hits that probepoint, kprobe_handler() on the latter CPU sees
that the kprobe has been unregistered, and attempts to let the CPU continue
as if the probepoint hadn't been hit.  The bug is that on i386 and x86_64,
we were neglecting to set the IP back to the beginning of the probed
instruction.  This could cause an oops or crash.

This bug doesn't exist on ppc64 and ia64, where a breakpoint instruction
leaves the IP pointing to the beginning of the instruction.  I don't know
about sparc64.  (Dave, could you please advise?)

This fix has been tested on i386 and x86_64 SMP systems.  To reproduce the
problem, set one CPU to work registering and unregistering a kprobe
repeatedly, and another CPU pounding the probepoint in a tight loop.

Acked-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Signed-off-by: Jim Keniston <jkenisto@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07 16:58:01 -07:00
..
alpha [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
arm [PATCH] Corgi: Add MMC/SD write protection switch handling 2005-09-07 16:57:54 -07:00
arm26 [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
cris [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
frv [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
h8300 [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
i386 [PATCH] kprobes: fix handling of simultaneous probe hit/unregister 2005-09-07 16:58:01 -07:00
ia64 [PATCH] Kprobes/IA64: fix race when break hits and kprobe not found 2005-09-07 16:58:00 -07:00
m32r [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
m68k [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
m68knommu [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
mips [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
parisc [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
ppc [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
ppc64 [PATCH] Kprobes: prevent possible race conditions ppc64 changes 2005-09-07 16:58:00 -07:00
s390 [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
sh [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
sh64 [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
sparc [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
sparc64 [PATCH] kprobes-prevent-possible-race-conditions-sparc64-changes fix 2005-09-07 16:58:00 -07:00
um [PATCH] remove verify_area(): remove verify_area() from various uaccess.h headers 2005-09-07 16:57:35 -07:00
v850 [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
x86_64 [PATCH] kprobes: fix handling of simultaneous probe hit/unregister 2005-09-07 16:58:01 -07:00
xtensa [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00