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)
committerAlex Shi <alex.shi@linaro.org>
Tue, 23 Jun 2015 07:28:33 +0000 (15:28 +0800)
commit0596b350c482f03eda8ed40867404bb2953b3e49
tree2ae7111e15ea5c879b5f291dfbaa2c049f999de8
parent0db03f43a007e764bf2a747e9cf742e07eb72b9a
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
(cherry picked from commit 1a71d6ffe18c0d0f03fc8531949cc8ed41d702ee)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
drivers/md/dm-crypt.c