From: Vegard Nossum <vegard.nossum@oracle.com>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Richard Weinberger <richard@nod.at>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: Endless getdents() in vfat filesystem
Date: Sun, 15 Nov 2015 12:05:45 +0100 [thread overview]
Message-ID: <56486709.7000004@oracle.com> (raw)
In-Reply-To: <87egfs30l8.fsf@mail.parknet.co.jp>
On 11/14/2015 07:19 PM, OGAWA Hirofumi wrote:
> Richard Weinberger <richard@nod.at> writes:
>
>>>> 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!
>
> Attached updated patch made smaller changes, and with missed Cc: stable.
>
> Andrew, please queue this up.
>
> Thanks.
>
It would be nice to have a proper patch description too. How about this?
"""
For the root directory, . and .. are faked (using dir_emit_dots()) and
ctx->pos is reset from 2 to 0.
A corrupted root directory could cause fat_get_entry() to fail, but
->iterate() (fat_readdir()) reports progress to the VFS (with ctx->pos
rewound to 0), so any following calls to ->iterate() continue to return
the same entries again and again.
The result is that userspace will never see the end of the directory,
causing e.g. 'ls' to hang in a getdents() loop.
"""
Thanks,
Vegard
next prev parent reply other threads:[~2015-11-15 11:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-14 1:19 Endless getdents() in vfat filesystem Vegard Nossum
2015-11-14 10:32 ` Richard Weinberger
2015-11-14 12:42 ` Vegard Nossum
2015-11-14 14:28 ` OGAWA Hirofumi
2015-11-14 15:06 ` Richard Weinberger
2015-11-14 18:19 ` OGAWA Hirofumi
2015-11-15 11:05 ` Vegard Nossum [this message]
2015-11-15 11:24 ` Richard Weinberger
2015-11-15 12:59 ` OGAWA Hirofumi
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=56486709.7000004@oracle.com \
--to=vegard.nossum@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=richard@nod.at \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.