From: viro@parcelfarce.linux.theplanet.co.uk
To: Andries.Brouwer@cwi.nl
Cc: torvalds@transmeta.com, viro@math.psu.edu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix oops in namespace.c
Date: Mon, 19 May 2003 19:20:16 +0100 [thread overview]
Message-ID: <20030519182016.GG10374@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <UTC200305182257.h4IMvbe09239.aeb@smtp.cwi.nl>
On Mon, May 19, 2003 at 12:57:37AM +0200, Andries.Brouwer@cwi.nl wrote:
> 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.
There's a better fix. Since we are going to use seq_...() anyway,
we both have a buffer and length. Moreover, if there's not enough
space to store the result, generic seq_file code will take care
about expanding buffer and calling us again.
IOW, we need to add seq_path(seq_file *, vfsmount *, dentry *) that would
DTRT. That would have a benefit of avoiding extra allocation/freeing.
I'll send such patch in ~20 minutes. BTW, it's also needed for /proc/swaps
and can be used for /proc/<pid>/maps if we switch it to seq_file (worth
doing anyway).
PS: math.psu.edu account is alive, but I'm not checking it often these
days, so Cc there is not too useful.
prev parent reply other threads:[~2003-05-19 18:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-18 22:57 Andries.Brouwer
2003-05-19 18:20 ` viro [this message]
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=20030519182016.GG10374@parcelfarce.linux.theplanet.co.uk \
--to=viro@parcelfarce.linux.theplanet.co.uk \
--cc=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®