[PATCH] cxl: Fix NULL pointer dereference on kernel contexts with no AFU interrupts

Andrew Donnellan andrew.donnellan at au1.ibm.com
Thu Jun 30 15:15:02 AEST 2016


On 30/06/16 15:00, Michael Ellerman wrote:
> On Thu, 2016-06-30 at 08:28 +1000, Andrew Donnellan wrote:
>> On 30/06/16 04:55, Ian Munsie wrote:
>>>
>>> From: Ian Munsie <imunsie at au1.ibm.com>
>>>
>>> If a kernel context is initialised and does not have any AFU interrupts
>>> allocated it will cause a NULL pointer dereference when the context is
>>> detached since the irq_names list will not have been initialised.
>>>
>>> Move the initialisation of the irq_names list into the cxl_context_init
>>> routine so that it will be valid for the entire lifetime of the context
>>> and will not cause a NULL pointer dereference.
>>>
>>> Signed-off-by: Ian Munsie <imunsie at au1.ibm.com>
>
>> As it's nice having your machine not crash on every shutdown...
>
> Fixes: ????

Ian can correct me if I'm wrong, but I suspect this doesn't affect 
cxlflash (the only current user of the cxl kernel API) - this issue was 
hit while working on CAPI support for mlx5.

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com  IBM Australia Limited



More information about the Linuxppc-dev mailing list