Re: [PATCH] powerpc/npu-dma.c: Fix crash after __mmu_notifier_register failure

2018-02-12 Thread Alistair Popple
Thanks Mark, this will also fix the lack of cleanup OPAL call in the unlikely case the kzalloc() fails. Acked-By: Alistair Popple On Friday, 9 February 2018 7:20:06 PM AEDT Mark Hairgrove wrote: > pnv_npu2_init_context wasn't checking the return code from >

[PATCH] powerpc/npu-dma.c: Fix crash after __mmu_notifier_register failure

2018-02-09 Thread Mark Hairgrove
pnv_npu2_init_context wasn't checking the return code from __mmu_notifier_register. If __mmu_notifier_register failed, the npu_context was still assigned to the mm and the caller wasn't given any indication that things went wrong. Later on pnv_npu2_destroy_context would be called, which in turn