From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: grub-devel@gnu.org
Subject: Re: [PATCH 2/4] xfs: Fix termination loop for directory iteration
Date: Mon, 11 May 2015 14:49:01 +0300 [thread overview]
Message-ID: <20150511144901.3184a6c8@opensuse.site> (raw)
In-Reply-To: <1405351291-24767-3-git-send-email-jack@suse.cz>
В Mon, 14 Jul 2014 17:21:29 +0200
Jan Kara <jack@suse.cz> пишет:
> Directory iteration used wrong position (sizeof wrong structure) for
> termination of iteration inside a directory block. Luckily the position
> ended up being wrong by just 1 byte and directory entries are larger so
> things worked out fine in practice. But fix the problem anyway.
>
Committed.
> Signed-off-by: Jan Kara <jack@suse.cz>
> ---
> grub-core/fs/xfs.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c
> index a2fc942707c1..ef3bc787e968 100644
> --- a/grub-core/fs/xfs.c
> +++ b/grub-core/fs/xfs.c
> @@ -608,8 +608,7 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
> - grub_be_to_cpu32 (tail->leaf_stale));
>
> /* Iterate over all entries within this block. */
> - while (pos < (dirblk_size
> - - (int) sizeof (struct grub_xfs_dir2_entry)))
> + while (pos < tail_start)
> {
> struct grub_xfs_dir2_entry *direntry;
> grub_uint8_t *freetag;
next prev parent reply other threads:[~2015-05-11 11:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-14 15:21 [PATCH 0/4] Support for XFS v5 superblock Jan Kara
2014-07-14 15:21 ` [PATCH 1/4] xfs: Add helper for inode size Jan Kara
2015-05-11 11:53 ` Andrei Borzenkov
2015-05-11 12:15 ` Jan Kara
2015-05-12 5:26 ` Andrei Borzenkov
2015-05-12 8:07 ` Jan Kara
2014-07-14 15:21 ` [PATCH 2/4] xfs: Fix termination loop for directory iteration Jan Kara
2015-05-11 11:49 ` Andrei Borzenkov [this message]
2014-07-14 15:21 ` [PATCH 3/4] xfs: Convert inode numbers to cpu endianity immediately after reading Jan Kara
2015-05-12 5:22 ` Andrei Borzenkov
2014-07-14 15:21 ` [PATCH 4/4] xfs: V5 filesystem format support Jan Kara
2015-05-12 5:23 ` Andrei Borzenkov
2015-05-12 13:47 ` Jan Kara
2015-05-13 4:50 ` Andrei Borzenkov
2015-05-13 7:12 ` Jan Kara
2014-07-21 17:31 ` [PATCH 0/4] Support for XFS v5 superblock Jan Kara
2014-07-21 21:42 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-09-23 7:39 ` Jan Kara
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=20150511144901.3184a6c8@opensuse.site \
--to=arvidjaar@gmail.com \
--cc=grub-devel@gnu.org \
--cc=jack@suse.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).