When uprobe_handler_part2() is called, it dereferences
pre_handler callback without any check, but
uprobe_handler_part2() is called itself from
uprobe_handler_atomic() when pre_handler is NULL.
Change-Id: Ia4cdbdc20c50aa3d891c790eea3545da06506f47
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
static int uprobe_handler_part2(struct uprobe *p, struct pt_regs *regs)
{
- if (!p->pre_handler(p, regs)) {
+ if (p->pre_handler && !p->pre_handler(p, regs)) {
prepare_tramp(p, regs);
if (p->ainsn.boostable == 1 && !p->post_handler)
goto exit_and_put_up;