create_trace_uprobe() does kern_path() to find ->d_inode, but forgets
to do path_put(). We can do this right after igrab().
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
if (ret)
goto fail_address_parse;
- ret = kstrtoul(arg, 0, &offset);
- if (ret)
- goto fail_address_parse;
-
inode = igrab(path.dentry->d_inode);
+ path_put(&path);
+
if (!S_ISREG(inode->i_mode)) {
ret = -EINVAL;
goto fail_address_parse;
}
+ ret = kstrtoul(arg, 0, &offset);
+ if (ret)
+ goto fail_address_parse;
+
argc -= 2;
argv += 2;