Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bcachefs: acl: Uninitialized variable in bch2_acl_chmod()

The clean up code at the end of the function uses "acl" so it needs
to be initialized to NULL.

Fixes: 53306e096d91 ("bcachefs: Always check for transaction restarts")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>

authored by

Dan Carpenter and committed by
Kent Overstreet
e9a0a26e 265cc423

+1 -1
+1 -1
fs/bcachefs/acl.c
··· 417 417 struct btree_iter iter; 418 418 struct bkey_s_c_xattr xattr; 419 419 struct bkey_i_xattr *new; 420 - struct posix_acl *acl; 420 + struct posix_acl *acl = NULL; 421 421 struct bkey_s_c k; 422 422 int ret; 423 423