diff options
author | Minjie Du <duminjie@vivo.com> | 2023-07-17 12:26:48 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-10-20 15:22:17 +0300 |
commit | ca2b746d5f91a37f01baedff54b9315a50ee617d (patch) | |
tree | b1453627707cde7a383b99f319296a9841acf9e0 /arch/powerpc | |
parent | 74726fda9fe306f848088ef73ec266cae0470d5b (diff) | |
download | linux-ca2b746d5f91a37f01baedff54b9315a50ee617d.tar.xz |
powerpc/pseries: use kfree_sensitive() in plpks_gen_password()
password might contain private information, so better use
kfree_sensitive to free it.
In plpks_gen_password() use kfree_sensitive().
Signed-off-by: Minjie Du <duminjie@vivo.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230717092648.9752-1-duminjie@vivo.com
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/pseries/plpks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/pseries/plpks.c b/arch/powerpc/platforms/pseries/plpks.c index 2d40304eb6c1..febe18f251d0 100644 --- a/arch/powerpc/platforms/pseries/plpks.c +++ b/arch/powerpc/platforms/pseries/plpks.c @@ -150,7 +150,7 @@ static int plpks_gen_password(void) ospasswordlength = maxpwsize; ospassword = kzalloc(maxpwsize, GFP_KERNEL); if (!ospassword) { - kfree(password); + kfree_sensitive(password); return -ENOMEM; } memcpy(ospassword, password, ospasswordlength); @@ -163,7 +163,7 @@ static int plpks_gen_password(void) } } out: - kfree(password); + kfree_sensitive(password); return pseries_status_to_err(rc); } |