powerpc/64s: Fix VAS mm use after free
authorNicholas Piggin <npiggin@gmail.com>
Wed, 7 Jun 2023 10:10:24 +0000 (20:10 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 15 Jun 2023 04:04:19 +0000 (14:04 +1000)
commitb4bda59b47879cce38a6ec5a01cd3cac702b5331
tree1eabf59f11b9e2051ea04d09304ec7dc98eef186
parent27be2456332dcd69907f086cda327ad923b222cf
powerpc/64s: Fix VAS mm use after free

The refcount on mm is dropped before the coprocessor is detached.

Reported-by: Sachin Sant <sachinp@linux.ibm.com>
Fixes: 7bc6f71bdff5f ("powerpc/vas: Define and use common vas_window struct")
Fixes: b22f2d88e435c ("powerpc/pseries/vas: Integrate API with open/close windows")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Tested-by: Sachin Sant <sachinp@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230607101024.14559-1-npiggin@gmail.com
arch/powerpc/platforms/powernv/vas-window.c
arch/powerpc/platforms/pseries/vas.c