From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10870 invoked by alias); 13 Mar 2006 06:23:30 -0000 Received: (qmail 10860 invoked by uid 48); 13 Mar 2006 06:23:27 -0000 Date: Mon, 13 Mar 2006 06:23:00 -0000 From: "bibo dot mao at intel dot com" To: systemtap@sources.redhat.com Message-ID: <20060313062327.2452.bibo.mao@intel.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug kprobes/2452] New: kretprobe spinlock recursive remove X-Bugzilla-Reason: AssignedTo Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q1/txt/msg00765.txt.bz2 In new linux kernel version, kretprobe in IA32 is implemented in kretprobe_trampoline. And probepoint is removed from kretprobe_trampoline, instead trampoline_handler is called directly. Currently if kretprobe hander hit one trap which causes another kretprobe, there will be SPINLOCK recursive bug. This patch fixes this, and will skip trap during kretprobe handler execution. And the test case is the same in http://sourceware.org/bugzilla/show_bug.cgi?id=2071. --- 2.6.16-rc6-mm1.org/arch/i386/kernel/kprobes.c 2006-03-13 12:25:15.000000000 +0800 +++ 2.6.16-rc6-mm1/arch/i386/kernel/kprobes.c 2006-03-13 11:38:26.000000000 +0800 @@ -389,9 +389,11 @@ fastcall void *__kprobes trampoline_hand /* another task is sharing our hash bucket */ continue; - if (ri->rp && ri->rp->handler) + if (ri->rp && ri->rp->handler){ + __get_cpu_var(current_kprobe) = &ri->rp->kp; ri->rp->handler(ri, regs); - + __get_cpu_var(current_kprobe) = NULL; + } orig_ret_address = (unsigned long)ri->ret_addr; recycle_rp_inst(ri); -- Summary: kretprobe spinlock recursive remove Product: systemtap Version: unspecified Status: NEW Severity: normal Priority: P2 Component: kprobes AssignedTo: systemtap at sources dot redhat dot com ReportedBy: bibo dot mao at intel dot com http://sourceware.org/bugzilla/show_bug.cgi?id=2452 ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.