Skip to content

Commit 4caae58

Browse files
skukretMike Snitzer
authored andcommitted
dm verity: set DM_TARGET_IMMUTABLE feature flag
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]>
1 parent 9571f82 commit 4caae58

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
@@ -1312,6 +1312,7 @@ static int verity_ctr(struct dm_target *ti, unsigned argc, char **argv)
13121312

13131313
static struct target_type verity_target = {
13141314
.name = "verity",
1315+
.features = DM_TARGET_IMMUTABLE,
13151316
.version = {1, 8, 0},
13161317
.module = THIS_MODULE,
13171318
.ctr = verity_ctr,

0 commit comments

Comments
 (0)