lkml.org 
[lkml]   [2018]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.19 227/361] ext4: initialize retries variable in ext4_da_write_inline_data_begin()
    Date
    4.19-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Lukas Czerner <lczerner@redhat.com>

    commit 625ef8a3acd111d5f496d190baf99d1a815bd03e upstream.

    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>
    Signed-off-by: Theodore Ts'o <tytso@mit.edu>
    Fixes: bc0ca9df3b2a ("ext4: retry allocation when inline->extent conversion failed")
    Cc: stable@kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    fs/ext4/inline.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/fs/ext4/inline.c
    +++ b/fs/ext4/inline.c
    @@ -863,7 +863,7 @@ int ext4_da_write_inline_data_begin(stru
    handle_t *handle;
    struct page *page;
    struct ext4_iloc iloc;
    - int retries;
    + int retries = 0;

    ret = ext4_get_inode_loc(inode, &iloc);
    if (ret)

    \
     
     \ /
      Last update: 2018-11-12 00:59    [W:2.792 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site