Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1269465

Re: Endless getdents() in vfat filesystem

From Richard Weinberger <richard.weinberger@gmail.com>
Newsgroups linux.kernel
Subject Re: Endless getdents() in vfat filesystem
Date 2015-11-14 11:40 +0100
Message-ID <quGps-2Pe-7@gated-at.bofh.it> (permalink)
References <quxPc-5G2-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Sat, Nov 14, 2015 at 2:19 AM, Vegard Nossum <vegard.nossum@oracle.com> wrote:
> Hi,
>
> Using the attached disk image I observe that getdents() never returns
> the end of the directory, i.e. mounting the disk image on a loopback
> device and running 'ls' under strace shows an endless stream of:
>
> getdents(3, /* 2 entries */, 32768)     = 48
> getdents(3, /* 2 entries */, 32768)     = 48
> getdents(3, /* 2 entries */, 32768)     = 48
> ...

Please more details. Is this image hand crafted?
If not, how has it been created? Is is supposed to work?

From a quick look it seems as the root directory is bad but we report
progress in ->iterate.
ctx->pos is 2, we set it back to 0, because of the faked dot entries.
but fat_get_entry() did not make any progress and we report 0 back to VFS.
So, VFS sees progress and the game continues.

Does the attached patch help?

-- 
Thanks,
//richard

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Endless getdents() in vfat filesystem Vegard Nossum <vegard.nossum@oracle.com> - 2015-11-14 02:30 +0100
  Re: Endless getdents() in vfat filesystem Richard Weinberger <richard.weinberger@gmail.com> - 2015-11-14 11:40 +0100
    Re: Endless getdents() in vfat filesystem Vegard Nossum <vegard.nossum@oracle.com> - 2015-11-14 13:50 +0100
      Re: Endless getdents() in vfat filesystem OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> - 2015-11-14 16:00 +0100
        Re: Endless getdents() in vfat filesystem Richard Weinberger <richard@nod.at> - 2015-11-14 16:10 +0100
          Re: Endless getdents() in vfat filesystem OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> - 2015-11-14 19:20 +0100
            Re: Endless getdents() in vfat filesystem Vegard Nossum <vegard.nossum@oracle.com> - 2015-11-15 12:10 +0100
              Re: Endless getdents() in vfat filesystem Richard Weinberger <richard@nod.at> - 2015-11-15 12:30 +0100
                Re: Endless getdents() in vfat filesystem OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> - 2015-11-15 14:00 +0100

csiph-web