]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm-secretmem-fix-panic-when-growing-a-memfd_secret-v2
authorAxel Rasmussen <axelrasmussen@google.com>
Thu, 14 Apr 2022 06:06:50 +0000 (23:06 -0700)
committerakpm <akpm@linux-foundation.org>
Thu, 14 Apr 2022 06:06:50 +0000 (23:06 -0700)
return EINVAL

Link: https://lkml.kernel.org/r/20220412193023.279320-1-axelrasmussen@google.com
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Mike Rapoport <rppt@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/secretmem.c

index ddf45c0435be7df0d7d32e58cc820d34988472b3..3b3cf2892b6ae8a7f5da0ce28030ac45e09b51ca 100644 (file)
@@ -165,7 +165,7 @@ static int secretmem_setattr(struct user_namespace *mnt_userns,
        unsigned int ia_valid = iattr->ia_valid;
 
        if ((ia_valid & ATTR_SIZE) && inode->i_size)
-               return -EOPNOTSUPP;
+               return -EINVAL;
 
        return simple_setattr(mnt_userns, dentry, iattr);
 }