summaryrefslogtreecommitdiff
path: root/scripts/lib/abi/helpers.py
diff options
context:
space:
mode:
authorAlexey Simakov <bigalex934@gmail.com>2025-12-02 20:18:38 +0300
committerMikulas Patocka <mpatocka@redhat.com>2025-12-10 19:28:22 +0100
commit2f6cfd6d7cb165a7af8877b838a9f6aab4159324 (patch)
tree82dabf37f89d31510ffe519243a2ddb003e1f2c1 /scripts/lib/abi/helpers.py
parent8581b19eb2c5ccf06c195d3b5468c3c9d17a5020 (diff)
dm-raid: fix possible NULL dereference with undefined raid type
rs->raid_type is assigned from get_raid_type_by_ll(), which may return NULL. This NULL value could be dereferenced later in the condition 'if (!(rs_is_raid10(rs) && rt_is_raid0(rs->raid_type)))'. Add a fail-fast check to return early with an error if raid_type is NULL, similar to other uses of this function. Found by Linux Verification Center (linuxtesting.org) with Svace. Fixes: 33e53f06850f ("dm raid: introduce extended superblock and new raid types to support takeover/reshaping") Signed-off-by: Alexey Simakov <bigalex934@gmail.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'scripts/lib/abi/helpers.py')
0 files changed, 0 insertions, 0 deletions