a bug but with this code change we'll survive that case and simply not have
meaningful PC and UPC values as argument to the probe, which is better than a
full scale OOPS due to NULL pointer dereference.
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
struct pt_regs *regs = get_irq_regs();
unsigned long pc = 0, upc = 0;
+if (regs) {
if (user_mode(regs))
upc = GET_IP(regs);
else
pc = GET_IP(regs);
+}
dtrace_probe(prof->prof_id, pc, upc, 0, 0, 0);
}
pcpu->profc_expected = ktime_add(pcpu->profc_expected,
pcpu->profc_interval);
+if (regs) {
if (user_mode(regs))
upc = GET_IP(regs);
else
pc = GET_IP(regs);
+}
dtrace_probe(prof->prof_id, pc, upc, ktime_to_ns(late), 0, 0);
}