mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
ocfs2: fix possible uninitialized variable access
In ocfs2_local_alloc_find_clear_bits and ocfs2_get_dentry, variable numfound and set may be uninitialized and then used in tracepoint. In ocfs2_xattr_block_get and ocfs2_delete_xattr_in_bucket, variable block_off and xv may be uninitialized and then used in the following logic due to unchecked return value. This patch fixes these possible issues. Signed-off-by: Joseph Qi <joseph.qi@huawei.com> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
7c01ad8fe7
commit
023d4ea358
3 changed files with 10 additions and 2 deletions
|
@ -1238,6 +1238,10 @@ static int ocfs2_xattr_block_get(struct inode *inode,
|
|||
i,
|
||||
&block_off,
|
||||
&name_offset);
|
||||
if (ret) {
|
||||
mlog_errno(ret);
|
||||
goto cleanup;
|
||||
}
|
||||
xs->base = bucket_block(xs->bucket, block_off);
|
||||
}
|
||||
if (ocfs2_xattr_is_local(xs->here)) {
|
||||
|
@ -5665,6 +5669,10 @@ static int ocfs2_delete_xattr_in_bucket(struct inode *inode,
|
|||
|
||||
ret = ocfs2_get_xattr_tree_value_root(inode->i_sb, bucket,
|
||||
i, &xv, NULL);
|
||||
if (ret) {
|
||||
mlog_errno(ret);
|
||||
break;
|
||||
}
|
||||
|
||||
ret = ocfs2_lock_xattr_remove_allocators(inode, xv,
|
||||
args->ref_ci,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue