pre_ssout() should do xol_free_insn_slot() if arch_uprobe_pre_xol()
fails, otherwise nobody will free the allocated slot.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Anton Arapov <anton@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
{
struct uprobe_task *utask;
unsigned long xol_vaddr;
+ int err;
utask = current->utask;
utask->xol_vaddr = xol_vaddr;
utask->vaddr = bp_vaddr;
- return arch_uprobe_pre_xol(&uprobe->arch, regs);
+ err = arch_uprobe_pre_xol(&uprobe->arch, regs);
+ if (unlikely(err)) {
+ xol_free_insn_slot(current);
+ return err;
+ }
+
+ return 0;
}
/*