Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1269495
| From | Richard Weinberger <richard@nod.at> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: Endless getdents() in vfat filesystem |
| Date | 2015-11-14 16:10 +0100 |
| Message-ID | <quKCJ-5Cl-5@gated-at.bofh.it> (permalink) |
| References | <quxPc-5G2-7@gated-at.bofh.it> <quGps-2Pe-7@gated-at.bofh.it> <quIrf-42Y-5@gated-at.bofh.it> <quKt4-5k2-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Am 14.11.2015 um 15:28 schrieb OGAWA Hirofumi: > Vegard Nossum <vegard.nossum@oracle.com> writes: > >> On 11/14/2015 11:32 AM, Richard Weinberger wrote: >>> 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? >> >> It was created by fuzzing, it is not supposed to work per se. >> >>> 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? >> >> Yes, it does fixes the problem here, but I can't really comment on the >> correctness of the patch. >> >> Thanks for the quick reponse, > > I made cleanup and made sure fake_offset is corrected. > > Richard, Signed-off-by was missed in your patch, so I added. Can you > agree to Signed-off-by? Sure! Thanks, //richard -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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