projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72e9ec2
)
dm-verity: fix a possible NULL pointer dereference
author
Mikulas Patocka
<mpatocka@redhat.com>
Thu, 9 Jul 2026 19:35:06 +0000
(21:35 +0200)
committer
Mikulas Patocka
<mpatocka@redhat.com>
Fri, 10 Jul 2026 12:41:43 +0000
(14:41 +0200)
Fix a possible NULL pointer dereference dm_verity_loadpin_is_bdev_trusted
if the device has no table.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Assisted-by: Claude:claude-opus-4-6
Fixes:
b6c1c5745ccc
("dm: Add verity helpers for LoadPin")
Cc: stable@vger.kernel.org
drivers/md/dm-verity-loadpin.c
patch
|
blob
|
history
diff --git
a/drivers/md/dm-verity-loadpin.c
b/drivers/md/dm-verity-loadpin.c
index
0666699
..
9a64f57
100644
(file)
--- a/
drivers/md/dm-verity-loadpin.c
+++ b/
drivers/md/dm-verity-loadpin.c
@@
-70,7
+70,7
@@
bool dm_verity_loadpin_is_bdev_trusted(struct block_device *bdev)
table = dm_get_live_table(md, &srcu_idx);
- if (table->num_targets != 1)
+ if (
!table ||
table->num_targets != 1)
goto out;
ti = dm_table_get_target(table, 0);