From: Nick Alcock Date: Tue, 17 Jan 2012 13:46:02 +0000 (+0000) Subject: dtrace: initialize the insn length in the right branch of the die notifier X-Git-Tag: v4.1.12-92~313^2~154 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6648dc0656a557b6d3bcc899556d956b3fbbf7ec;p=users%2Fjedix%2Flinux-maple.git dtrace: initialize the insn length in the right branch of the die notifier Absent this fix, dtrace will crash on any platform *except* for a buggy Xen. Signed-off-by: Nick Alcock --- diff --git a/kernel/dtrace/dtrace_os.c b/kernel/dtrace/dtrace_os.c index b20e9bc8c3aa..cc0d8e20a993 100644 --- a/kernel/dtrace/dtrace_os.c +++ b/kernel/dtrace/dtrace_os.c @@ -307,6 +307,9 @@ static int dtrace_die_notifier(struct notifier_block *nb, unsigned long val, } if (rval != 0) { + kernel_insn_init(&insn, (void *)dargs->regs->ip); + insn_get_length(&insn); + dargs->regs->ip += insn.length; return NOTIFY_OK | NOTIFY_STOP_MASK;