diff options
author | 2023-01-11 16:59:43 +0800 | |
---|---|---|
committer | 2023-03-27 16:59:16 +0400 | |
commit | ec275bf9693d19cc0fdce8436f4c425ced86f6e7 (patch) | |
tree | 1477e6c89a6d9b9d46244ca513f765124563f6ef /tools/perf/scripts/python/export-to-postgresql.py | |
parent | fs/ntfs3: Refactoring of various minor issues (diff) | |
download | wireguard-linux-ec275bf9693d19cc0fdce8436f4c425ced86f6e7.tar.xz wireguard-linux-ec275bf9693d19cc0fdce8436f4c425ced86f6e7.zip |
fs/ntfs3: Fix a possible null-pointer dereference in ni_clear()
In a previous commit c1006bd13146, ni->mi.mrec in ni_write_inode()
could be NULL, and thus a NULL check is added for this variable.
However, in the same call stack, ni->mi.mrec can be also dereferenced
in ni_clear():
ntfs_evict_inode(inode)
ni_write_inode(inode, ...)
ni = ntfs_i(inode);
is_rec_inuse(ni->mi.mrec) -> Add a NULL check by previous commit
ni_clear(ntfs_i(inode))
is_rec_inuse(ni->mi.mrec) -> No check
Thus, a possible null-pointer dereference may exist in ni_clear().
To fix it, a NULL check is added in this function.
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions