Commit c6b523ab authored by Andries E. Brouwer's avatar Andries E. Brouwer Committed by Linus Torvalds

[PATCH] fix oops in namespace.c

A familar type of Oops: d_path() can return an error ENAMETOOLONG, and
if we fail to test a segfault occurs.

So we must test.  What we do is a different matter.  Rather arbitrarily
I return the string " (too long)" for use in /proc/mounts.
parent 34160b98
......@@ -217,6 +217,8 @@ static int show_vfsmnt(struct seq_file *m, void *v)
if (!path_buf)
return -ENOMEM;
path = d_path(mnt->mnt_root, mnt, path_buf, PAGE_SIZE);
if (IS_ERR(path))
path = " (too long)";
mangle(m, mnt->mnt_devname ? mnt->mnt_devname : "none");
seq_putc(m, ' ');
......
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