[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87iqv1wwy1.wl%ysato@users.sourceforge.jp>
Date: Sat, 19 Jul 2008 14:28:06 -0400
From: Yoshinori Sato <ysato@...rs.sourceforge.jp>
To: OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] filldir write data missing size
At Sun, 20 Jul 2008 02:24:28 +0900,
OGAWA Hirofumi wrote:
>
> Yoshinori Sato <ysato@...rs.sourceforge.jp> writes:
>
> > "loff_t" is long long.
> > But "d_off" is unsigned long.
> >
> > Signed-off-by: Yoshinori Sato <ysato@...rs.sourceforge.jp>
> >
> > diff --git a/fs/readdir.c b/fs/readdir.c
> > index 4e026e5..01e7152
> > --- a/fs/readdir.c
> > +++ b/fs/readdir.c
> > @@ -159,7 +159,7 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
> > return -EOVERFLOW;
> > dirent = buf->previous;
> > if (dirent) {
> > - if (__put_user(offset, &dirent->d_off))
> > + if (__put_user((unsigned long)offset, &dirent->d_off))
>
> Um.. __put_user() should be already doing it automatically..
I'm mistake.
I checked object, and found bad code.
This problem fix __put_user.
Thanks.
> > goto efault;
> > }
> > dirent = buf->current_dir;
> --
> OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
--
Yoshinori Sato
<ysato@...rs.sourceforge.jp>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists