lkml.org 
[lkml]   [2016]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.2.y-ckt 002/268] ovl: allow zero size xattr
    Date
    4.2.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

    ---8<------------------------------------------------------------

    From: Miklos Szeredi <miklos@szeredi.hu>

    commit 97daf8b97ad6f913a34c82515be64dc9ac08d63e upstream.

    When ovl_copy_xattr() encountered a zero size xattr no more xattrs were
    copied and the function returned success. This is clearly not the desired
    behavior.

    Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
    Signed-off-by: Kamal Mostafa <kamal@canonical.com>
    ---
    fs/overlayfs/copy_up.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c
    index 871fcb6..394e87f 100644
    --- a/fs/overlayfs/copy_up.c
    +++ b/fs/overlayfs/copy_up.c
    @@ -54,7 +54,7 @@ int ovl_copy_xattr(struct dentry *old, struct dentry *new)

    for (name = buf; name < (buf + list_size); name += strlen(name) + 1) {
    size = vfs_getxattr(old, name, value, XATTR_SIZE_MAX);
    - if (size <= 0) {
    + if (size < 0) {
    error = size;
    goto out_free_value;
    }
    --
    1.9.1
    \
     
     \ /
      Last update: 2016-01-27 23:21    [W:3.482 / U:0.320 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site