aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/net_dropmonitor.py
diff options
context:
space:
mode:
authorLi Zetao <[email protected]>2024-03-04 11:22:03 +0800
committerKent Overstreet <[email protected]>2024-03-10 15:09:59 -0400
commitf8cdf65b51f036d77edece8a175447dd41be63ca (patch)
tree585dd00840ba676c0efd57dc712af2816c240170 /tools/perf/scripts/python/net_dropmonitor.py
parentd206a76d7d2726f3b096037f2079ce0bd3ba329b (diff)
bcachefs: Fix null-ptr-deref in bch2_fs_alloc()
There is a null-ptr-deref issue reported by kasan: KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] Call Trace: <TASK> bch2_fs_alloc+0x1092/0x2170 [bcachefs] bch2_fs_open+0x683/0xe10 [bcachefs] ... When initializing the name of bch_fs, it needs to dynamically alloc memory to meet the length of the name. However, when name allocation failed, it will cause a null-ptr-deref access exception in subsequent string copy. Fix this issue by checking if name allocation is successful. Fixes: 401ec4db6308 ("bcachefs: Printbuf rework") Signed-off-by: Li Zetao <[email protected]> Signed-off-by: Kent Overstreet <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions