From edf5e43f9ad6bdd5f3066f92e12a7f3c60dd656a Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sun, 26 Feb 2017 19:31:06 +0100 Subject: [PATCH] libdm: passthrough checks traling space char When checking for passthrough length, check also for extra ' ' char just like with other feature strings. --- WHATS_NEW_DM | 1 + libdm/libdm-targets.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index f11b28c7b..bfa6d55bf 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.138 - ===================================== + Cache status check for passthrough also require trailing space. Add extra memory page when limiting pthread stack size in dmeventd. Avoids immediate resume when preloaded device is smaller. Do not suppress kernel key description in dmsetup table output. diff --git a/libdm/libdm-targets.c b/libdm/libdm-targets.c index 6b8337234..8c987908e 100644 --- a/libdm/libdm-targets.c +++ b/libdm/libdm-targets.c @@ -274,7 +274,7 @@ int dm_get_status_cache(struct dm_pool *mem, const char *params, s->feature_flags |= DM_CACHE_FEATURE_WRITETHROUGH; else if (!strncmp(p, "writeback ", 10)) s->feature_flags |= DM_CACHE_FEATURE_WRITEBACK; - else if (!strncmp(p, "passthrough ", 11)) + else if (!strncmp(p, "passthrough ", 12)) s->feature_flags |= DM_CACHE_FEATURE_PASSTHROUGH; else log_error("Unknown feature in status: %s", params);