lkml.org 
[lkml]   [2017]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 016/178] ovl: update ctx->pos on impure dir iteration
    Date
    4.14-stable review patch.  If anyone has any objections, please let me know.

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

    From: Amir Goldstein <amir73il@gmail.com>

    commit b02a16e6413a2f782e542ef60bad9ff6bf212f8a upstream.

    This fixes a regression with readdir of impure dir in overlayfs
    that is shared to VM via 9p fs.

    Reported-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
    Fixes: 4edb83bb1041 ("ovl: constant d_ino for non-merge dirs")
    Signed-off-by: Amir Goldstein <amir73il@gmail.com>
    Tested-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
    Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    fs/overlayfs/readdir.c | 5 ++++-
    1 file changed, 4 insertions(+), 1 deletion(-)

    --- a/fs/overlayfs/readdir.c
    +++ b/fs/overlayfs/readdir.c
    @@ -645,7 +645,10 @@ static int ovl_iterate_real(struct file
    return PTR_ERR(rdt.cache);
    }

    - return iterate_dir(od->realfile, &rdt.ctx);
    + err = iterate_dir(od->realfile, &rdt.ctx);
    + ctx->pos = rdt.ctx.pos;
    +
    + return err;
    }



    \
     
     \ /
      Last update: 2017-12-18 17:12    [W:4.158 / U:0.332 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site