From: Lukas Czerner <lczerner@redhat.com>
To: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org, Ted Tso <tytso@mit.edu>
Subject: Re: [PATCH] ext4: initialize retries variable in ext4_da_write_inline_data_begin()
Date: Wed, 26 Sep 2018 11:01:21 +0200 [thread overview]
Message-ID: <20180926090121.iu7bezcbgpm5ldtw@localhost.localdomain> (raw)
In-Reply-To: <20180912155448.GB32355@quack2.suse.cz>
On Wed, Sep 12, 2018 at 05:54:48PM +0200, Jan Kara wrote:
> On Mon 13-08-18 15:34:59, Lukas Czerner wrote:
> > Variable retries is not initialized in ext4_da_write_inline_data_begin()
> > which can lead to nondeterministic number of retries in case we hit
> > ENOSPC. Initialize retries to zero as we do everywhere else.
> >
> > Signed-off-by: Lukas Czerner <lczerner@redhat.com>
> > Fixes: bc0ca9df3b2a ("ext4: retry allocation when inline->extent conversion failed")
> > Cc: stable@kernel.org
> > ---
> > fs/ext4/inline.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Ted, this seems to have fallen through the cracks...
Yeah it did, Ted can you pick this up ?
-Lukas
>
> Honza
>
> >
> > diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
> > index 3543fe80a3c4..1b13fa5c9d6e 100644
> > --- a/fs/ext4/inline.c
> > +++ b/fs/ext4/inline.c
> > @@ -863,7 +863,7 @@ int ext4_da_write_inline_data_begin(struct address_space *mapping,
> > handle_t *handle;
> > struct page *page;
> > struct ext4_iloc iloc;
> > - int retries;
> > + int retries = 0;
> >
> > ret = ext4_get_inode_loc(inode, &iloc);
> > if (ret)
> > --
> > 2.17.1
> >
> --
> Jan Kara <jack@suse.com>
> SUSE Labs, CR
next parent reply other threads:[~2018-09-26 15:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180813133459.24241-1-lczerner@redhat.com>
[not found] ` <20180912155448.GB32355@quack2.suse.cz>
2018-09-26 9:01 ` Lukas Czerner [this message]
2018-10-03 1:24 ` [PATCH] ext4: initialize retries variable in ext4_da_write_inline_data_begin() Theodore Y. Ts'o
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=20180926090121.iu7bezcbgpm5ldtw@localhost.localdomain \
--to=lczerner@redhat.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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