Skip to content

Commit 8df42bc

Browse files
skukretgregkh
authored andcommitted
dm verity: set DM_TARGET_IMMUTABLE feature flag
commit 4caae58 upstream. The device-mapper framework provides a mechanism to mark targets as immutable (and hence fail table reloads that try to change the target type). Add the DM_TARGET_IMMUTABLE flag to the dm-verity target's feature flags to prevent switching the verity target with a different target type. Fixes: a4ffc15 ("dm: add verity target") Cc: [email protected] Signed-off-by: Sarthak Kukreti <[email protected]> Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e39b536 commit 8df42bc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/md/dm-verity-target.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,7 @@ static int verity_ctr(struct dm_target *ti, unsigned argc, char **argv)
12421242

12431243
static struct target_type verity_target = {
12441244
.name = "verity",
1245+
.features = DM_TARGET_IMMUTABLE,
12451246
.version = {1, 7, 0},
12461247
.module = THIS_MODULE,
12471248
.ctr = verity_ctr,

0 commit comments

Comments
 (0)