From a5e9cfa6b4ed9cef39baea5700922612269f2acf Mon Sep 17 00:00:00 2001 From: John Levon Date: Sun, 25 May 2003 07:43:05 -0700 Subject: [PATCH] [PATCH] OProfile: fix d_path() usage d_path() can return -ENAMETOOLONG these days. Pass it upstream. --- fs/dcookies.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs/dcookies.c b/fs/dcookies.c index 7365acccf39..277ef25dff5 100644 --- a/fs/dcookies.c +++ b/fs/dcookies.c @@ -175,6 +175,11 @@ asmlinkage long sys_lookup_dcookie(u64 cookie64, char * buf, size_t len) /* FIXME: (deleted) ? */ path = d_path(dcs->dentry, dcs->vfsmnt, kbuf, PAGE_SIZE); + if (IS_ERR(path)) { + err = PTR_ERR(path); + goto out_free; + } + err = -ERANGE; pathlen = kbuf + PAGE_SIZE - path; @@ -184,6 +189,7 @@ asmlinkage long sys_lookup_dcookie(u64 cookie64, char * buf, size_t len) err = -EFAULT; } +out_free: kfree(kbuf); out: up(&dcookie_sem); -- 2.11.4.GIT