crypto/nx: Initialize coproc entry with kzalloc
authorHaren Myneni <haren@linux.ibm.com>
Fri, 17 Apr 2020 09:02:43 +0000 (02:02 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 20 Apr 2020 06:53:14 +0000 (16:53 +1000)
commit7673d6568b141f34b4b59232f8de8d484408d2ee
tree5232eb72835862bb8d62351743e899b2f61a55ab
parentdda44eb29c235735a5ceae283dc521cfca27885c
crypto/nx: Initialize coproc entry with kzalloc

coproc entry is initialized during NX probe on power9, but not on P8.
nx842_delete_coprocs() is used for both and frees receive window if it
is allocated. Getting crash for rmmod on P8 since coproc->vas.rxwin
is not initialized.

This patch replaces kmalloc with kzalloc in nx842_powernv_probe()

Signed-off-by: Haren Myneni <haren@linux.ibm.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1587114163.2275.1110.camel@hbabu-laptop
drivers/crypto/nx/nx-842-powernv.c