dm crypt: use memzero_explicit for on-stack buffer
commit64ce4fff66322b496bbcffa9505a49056cd84150
authorMilan Broz <gmazyland@gmail.com>
Sat, 22 Nov 2014 08:36:04 +0000 (22 09:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2015 18:27:46 +0000 (8 10:27 -0800)
tree2008ae7d6703d121cd73f807683783538fedd236
parentd3c1fca2bd2181c74f1ea62366e1f89fc1150fb4
dm crypt: use memzero_explicit for on-stack buffer

commit 1a71d6ffe18c0d0f03fc8531949cc8ed41d702ee upstream.

Use memzero_explicit to cleanup sensitive data allocated on stack
to prevent the compiler from optimizing and removing memset() calls.

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-crypt.c