Re: [PATCH v2] Uprobes: Fix kernel oops with delayed_uprobe_remove()

From: Oleg Nesterov
Date: Wed Dec 05 2018 - 09:39:22 EST


On 12/05, Ravi Bangoria wrote:
>
> --- a/kernel/events/uprobes.c
> +++ b/kernel/events/uprobes.c
> @@ -572,7 +572,9 @@ static void put_uprobe(struct uprobe *uprobe)
> * gets called, we don't get a chance to remove uprobe from
> * delayed_uprobe_list from remove_breakpoint(). Do it here.
> */
> + mutex_lock(&delayed_uprobe_lock);
> delayed_uprobe_remove(uprobe, NULL);
> + mutex_unlock(&delayed_uprobe_lock);
> kfree(uprobe);

Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>