dm crypt: use memzero_explicit for on-stack buffer
authorMilan Broz <gmazyland@gmail.com>
Sat, 22 Nov 2014 08:36:04 +0000 (09:36 +0100)
committerMike Snitzer <snitzer@redhat.com>
Tue, 2 Dec 2014 15:25:07 +0000 (10:25 -0500)
commit1a71d6ffe18c0d0f03fc8531949cc8ed41d702ee
tree23a55aac2b85ea96d94ad54897293020d4615167
parent02717d9855400c12c6e338ce1f5c2e1310def49a
dm crypt: use memzero_explicit for on-stack buffer

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>
Cc: stable@vger.kernel.org
drivers/md/dm-crypt.c