mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andries.Brouwer@cwi.nl
To: torvalds@transmeta.com, viro@math.psu.edu
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] fix oops in namespace.c
Date: Mon, 19 May 2003 00:57:37 +0200 (MEST)	[thread overview]
Message-ID: <UTC200305182257.h4IMvbe09239.aeb@smtp.cwi.nl> (raw)

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, ' ');

             reply	other threads:[~2003-05-18 22:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-18 22:57 Andries.Brouwer [this message]
2003-05-19 18:20 ` viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=UTC200305182257.h4IMvbe09239.aeb@smtp.cwi.nl \
    --to=andries.brouwer@cwi.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=viro@math.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®