Message ID | f89d98a2-fe7e-a9d3-5bdc-2a1943e09049@users.sourceforge.net (mailing list archive) |
---|---|
State | Deferred, archived |
Delegated to: | Mike Snitzer |
Headers | show |
On Wed, Sep 28, 2016 at 05:42:28PM +0200, SF Markus Elfring wrote: > From: Markus Elfring <elfring@users.sourceforge.net> > Date: Wed, 28 Sep 2016 15:21:18 +0200 > > Adjust jump labels according to the current Linux coding style convention. > > - > -out: > +set_memory: > /* Hex key string not needed after here, so wipe it. */ > memset(key, '0', key_string_len); Also not "current Linux coding style convetion". - Ted -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 7778e9b..7e0fd82 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1496,20 +1496,19 @@ static int crypt_set_key(struct crypt_config *cc, char *key) /* The key size may not be changed. */ if (cc->key_size != (key_string_len >> 1)) - goto out; + goto set_memory; /* Hyphen (which gives a key_size of zero) means there is no key. */ if (!cc->key_size && strcmp(key, "-")) - goto out; + goto set_memory; if (cc->key_size && crypt_decode_key(cc->key, key, cc->key_size) < 0) - goto out; + goto set_memory; set_bit(DM_CRYPT_KEY_VALID, &cc->flags); r = crypt_setkey_allcpus(cc); - -out: +set_memory: /* Hex key string not needed after here, so wipe it. */ memset(key, '0', key_string_len);