Re: [PATCH v5 2/2] tracing: remove igrab() iput() call from uprobes.c

From: Miklos Szeredi
Date: Thu Apr 26 2018 - 09:26:01 EST


On Mon, Apr 23, 2018 at 7:21 PM, Song Liu <songliubraving@xxxxxx> wrote:
> Caller of uprobe_register is required to keep the inode and containing
> mount point referenced.
>
> There was misuse of igrab() in uprobes.c and trace_uprobe.c. This is
> because igrab() will not prevent umount of the containing mount point.
> To fix this, we added path to struct trace_uprobe, which keeps the inode
> and containing mount reference.
>
> For uprobes.c, it is not necessary to call igrab() in uprobe_register(),
> as the caller is required to keep the inode reference. The igrab() is
> removed and comments on this requirement is added to uprobe_register().
>
> Link: http://lkml.kernel.org/r/CAELBmZB2XX=qEOLAdvGG4cPx4GEntcSnWQquJLUK1ongRj35cA@xxxxxxxxxxxxxx
> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Howard McLauchlan <hmclauchlan@xxxxxx>
> Cc: Josef Bacik <jbacik@xxxxxx>
> Cc: Srikar Dronamraju <srikar@xxxxxxxxxxxxxxxxxx>
> Cc: Miklos Szeredi <miklos@xxxxxxxxxx>
> Signed-off-by: Song Liu <songliubraving@xxxxxx>

Acked-by: Miklos Szeredi <mszeredi@xxxxxxxxxx>