[PATCH] Kprobes: Oops! in unregister_kprobe()

Jim Keniston jkenisto@us.ibm.com
Wed Apr 13 00:36:00 GMT 2005


On Tue, 2005-04-12 at 00:06, Prasanna S Panchamukhi wrote:
> > > 
> > > kernel oops! when unregister_kprobe() is called on a non-registered
> > > kprobe. This patch fixes the above problem by checking if the probe exists
> > > before unregistering.
> > > 
> > > Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
> > > 
> > 
> > This bug is a byproduct of the x86_64 wart described in
> > http://sourceware.org/ml/systemtap/2005-q2/msg00059.html.
> > 
> 
> Jim,
> 
> The problem addressed by this patch is not specific to x86_64. It occurs
> on all architectures.
> 
> Thanks
> Prasanna

Yeah, you're right.  The failure to verify that the kprobe is registered
affects all architectures.  Calling arch_remove_kprobe() before you've
checked is only part of the bug -- a part that affects only x86_64,
because it's a no-op for the other architectures.

Jim



More information about the Systemtap mailing list