]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
gfs2: setattr_chown: Add missing initialization
authorAndreas Gruenbacher <agruenba@redhat.com>
Sat, 21 Oct 2023 18:51:13 +0000 (20:51 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Mon, 23 Oct 2023 09:47:13 +0000 (11:47 +0200)
Add a missing initialization of variable ap in setattr_chown().
Without, chown() may be able to bypass quotas.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/inode.c

index 697f95047033d27cdf08772495483f8fccea805b..ee5b07d296f7485738670bf0a1d6971753c86ea6 100644 (file)
@@ -1927,7 +1927,7 @@ static int setattr_chown(struct inode *inode, struct iattr *attr)
        kuid_t ouid, nuid;
        kgid_t ogid, ngid;
        int error;
-       struct gfs2_alloc_parms ap;
+       struct gfs2_alloc_parms ap = {};
 
        ouid = inode->i_uid;
        ogid = inode->i_gid;