lkml.org 
[lkml]   [2005]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH as442] gcc 2.96 workaround in sys_getdents64()
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/

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.046 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site