mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fix oops in namespace.c
@ 2003-05-18 22:57 Andries.Brouwer
  2003-05-19 18:20 ` viro
  0 siblings, 1 reply; 2+ messages in thread
From: Andries.Brouwer @ 2003-05-18 22:57 UTC (permalink / raw)
  To: torvalds, viro; +Cc: linux-kernel

Number four in the series of namespace.c fixes:

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.

Andries

--- namespace.c~	Mon May 19 01:50:48 2003
+++ namespace.c	Mon May 19 01:51:24 2003
@@ -217,6 +217,8 @@
 	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, ' ');

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-19 18:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-18 22:57 [PATCH] fix oops in namespace.c Andries.Brouwer
2003-05-19 18:20 ` viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®