Commit a5e9cfa6 authored by John Levon's avatar John Levon Committed by Linus Torvalds

[PATCH] OProfile: fix d_path() usage

d_path() can return -ENAMETOOLONG these days. Pass it upstream.
parent aacb2a25
...@@ -175,6 +175,11 @@ asmlinkage long sys_lookup_dcookie(u64 cookie64, char * buf, size_t len) ...@@ -175,6 +175,11 @@ asmlinkage long sys_lookup_dcookie(u64 cookie64, char * buf, size_t len)
/* FIXME: (deleted) ? */ /* FIXME: (deleted) ? */
path = d_path(dcs->dentry, dcs->vfsmnt, kbuf, PAGE_SIZE); path = d_path(dcs->dentry, dcs->vfsmnt, kbuf, PAGE_SIZE);
if (IS_ERR(path)) {
err = PTR_ERR(path);
goto out_free;
}
err = -ERANGE; err = -ERANGE;
pathlen = kbuf + PAGE_SIZE - path; pathlen = kbuf + PAGE_SIZE - path;
...@@ -184,6 +189,7 @@ asmlinkage long sys_lookup_dcookie(u64 cookie64, char * buf, size_t len) ...@@ -184,6 +189,7 @@ asmlinkage long sys_lookup_dcookie(u64 cookie64, char * buf, size_t len)
err = -EFAULT; err = -EFAULT;
} }
out_free:
kfree(kbuf); kfree(kbuf);
out: out:
up(&dcookie_sem); up(&dcookie_sem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment