summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-05-27 11:54:36 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2021-05-27 11:54:36 -1000
commit38747c9a2d221ad899a1a861777ee79a11ab6e73 (patch)
tree305e93bdc058cb92109139d43be8047a0decb49b /drivers
parent3224374f7eb08fbb36d3963895da20ff274b8e6a (diff)
parent7e768532b2396bcb7fbf6f82384b85c0f1d2f197 (diff)
Merge tag 'for-5.13/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
Pull device mapper fixes from Mike Snitzer: - Fix DM verity target's 'require_signatures' module_param permissions. - Revert DM snapshot fix from v5.13-rc3 and then properly fix crash when an origin has no snapshots. This allows only the proper fix to go to stable@ (since the original fix was successfully dropped). * tag 'for-5.13/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm snapshot: properly fix a crash when an origin has no snapshots dm snapshot: revert "fix a crash when an origin has no snapshots" dm verity: fix require_signatures module_param permissions
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/dm-snap.c3
-rw-r--r--drivers/md/dm-verity-verify-sig.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index b8e4d31124ea..751ec5ea1dbb 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -859,7 +859,8 @@ static uint32_t __minimum_chunk_size(struct origin *o)
if (o)
list_for_each_entry(snap, &o->snapshots, list)
- chunk_size = min(chunk_size, snap->store->chunk_size);
+ chunk_size = min_not_zero(chunk_size,
+ snap->store->chunk_size);
return (uint32_t) chunk_size;
}
diff --git a/drivers/md/dm-verity-verify-sig.c b/drivers/md/dm-verity-verify-sig.c
index 29385dc470d5..db61a1f43ae9 100644
--- a/drivers/md/dm-verity-verify-sig.c
+++ b/drivers/md/dm-verity-verify-sig.c
@@ -15,7 +15,7 @@
#define DM_VERITY_VERIFY_ERR(s) DM_VERITY_ROOT_HASH_VERIFICATION " " s
static bool require_signatures;
-module_param(require_signatures, bool, false);
+module_param(require_signatures, bool, 0444);
MODULE_PARM_DESC(require_signatures,
"Verify the roothash of dm-verity hash tree");