From: Andreas Dilger <adilger@clusterfs.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Andrew Morton <akpm@osdl.org>,
Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH as442] gcc 2.96 workaround in sys_getdents64()
Date: Thu, 13 Jan 2005 11:47:34 -0700 [thread overview]
Message-ID: <20050113184734.GF8098@schnapps.adilger.int> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0501131132520.959-100000@ida.rowland.org>
[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]
On Jan 13, 2005 11:39 -0500, Alan Stern wrote:
> How serious are people about continuing to support versions of gcc prior
> to 3.0? My copy of RedHat's gcc-2.96 croaks without this patch:
>
>
> Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
>
> ===== fs/readdir.c 1.26 vs edited =====
> --- 1.26/fs/readdir.c 2005-01-09 08:29:46 -05:00
> +++ edited/fs/readdir.c 2005-01-13 11:31:58 -05:00
> @@ -288,7 +288,7 @@
> if (lastdirent) {
> typeof(lastdirent->d_off) d_off = file->f_pos;
> error = count - buf.count;
> - if (__put_user(d_off, &lastdirent->d_off))
> + if (put_user(d_off, &lastdirent->d_off))
> error = -EFAULT;
> }
>
>
> For changes involving code that's not executed very often I wouldn't
> hesitate to recommend adopting such a patch. Does sys_getdents64() fall
> in that category? Also I'm not sure how much extra overhead is added by
> calling put_user() rather than __put_user().
The getdents64() syscall is used for every readdir, though I doubt the
extra overhead would be fatal. In any case, Linus already accepted a
different patch which set "error = -EFAULT" first, then "count - buf.count"
afterward.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://members.shaw.ca/adilger/ http://members.shaw.ca/golinux/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2005-01-13 18:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-13 16:39 Alan Stern
2005-01-13 18:47 ` Andreas Dilger [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=20050113184734.GF8098@schnapps.adilger.int \
--to=adilger@clusterfs.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stern@rowland.harvard.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®