Commit 27603a60 authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by Kees Cook

dm: verity-loadpin: Drop use of dm_table_get_num_targets()

Commit 2aec377a ("dm table: remove dm_table_get_num_targets()
wrapper") in linux-dm/for-next removed the function
dm_table_get_num_targets() which is used by verity-loadpin. Access
table->num_targets directly instead of using the defunct wrapper.

Fixes: b6c1c574 ("dm: Add verity helpers for LoadPin")
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarMatthias Kaehlcke <mka@chromium.org>
Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220728085412.1.I242d21b378410eb6f9897a3160efb56e5608c59d@changeid
parent aaf50b19
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include <linux/dm-verity-loadpin.h> #include <linux/dm-verity-loadpin.h>
#include "dm.h" #include "dm.h"
#include "dm-core.h"
#include "dm-verity.h" #include "dm-verity.h"
#define DM_MSG_PREFIX "verity-loadpin" #define DM_MSG_PREFIX "verity-loadpin"
...@@ -58,7 +59,7 @@ bool dm_verity_loadpin_is_bdev_trusted(struct block_device *bdev) ...@@ -58,7 +59,7 @@ bool dm_verity_loadpin_is_bdev_trusted(struct block_device *bdev)
table = dm_get_live_table(md, &srcu_idx); table = dm_get_live_table(md, &srcu_idx);
if (dm_table_get_num_targets(table) != 1) if (table->num_targets != 1)
goto out; goto out;
ti = dm_table_get_target(table, 0); ti = dm_table_get_target(table, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment