diff options
author | Fan Wu <wufan@linux.microsoft.com> | 2024-01-30 23:37:00 +0100 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2024-02-20 20:22:55 +0100 |
commit | 9356fcfe0ac4a8545f9fc32f2e404524e1115ee6 (patch) | |
tree | 4aeb2a2d36580733b9999c7854e32f3f2f6bb733 /drivers/md/dm-verity-target.c | |
parent | dm crypt: Fix IO priority lost when queuing write bios (diff) | |
download | linux-9356fcfe0ac4a8545f9fc32f2e404524e1115ee6.tar.xz linux-9356fcfe0ac4a8545f9fc32f2e404524e1115ee6.zip |
dm verity: set DM_TARGET_SINGLETON feature flag
The device-mapper has a flag to mark targets as singleton, which is a
required flag for immutable targets. Without this flag, multiple
dm-verity targets can be added to a mapped device, which has no
practical use cases and will let dm_table_get_immutable_target return
NULL. This patch adds the missing flag, restricting only one
dm-verity target per mapped device.
Signed-off-by: Fan Wu <wufan@linux.microsoft.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md/dm-verity-target.c')
-rw-r--r-- | drivers/md/dm-verity-target.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity-target.c index 01ec71dcbc7d..6b8f9698488e 100644 --- a/drivers/md/dm-verity-target.c +++ b/drivers/md/dm-verity-target.c @@ -1566,7 +1566,7 @@ int dm_verity_get_root_digest(struct dm_target *ti, u8 **root_digest, unsigned i static struct target_type verity_target = { .name = "verity", - .features = DM_TARGET_IMMUTABLE, + .features = DM_TARGET_SINGLETON | DM_TARGET_IMMUTABLE, .version = {1, 10, 0}, .module = THIS_MODULE, .ctr = verity_ctr, |