Re: [PATCH] cxl: Perform NULL check for 'cxl_afu *' at various places in cxl

2018-03-14 Thread Vaibhav Jain
Thanks for reviewing this patch Fred, Frederic Barrat writes: > So we are calling functions with an invalid afu argument. We can verify > in the callees the value of the afu pointer, like you're doing here, but > why not tackle it at source and avoid calling the function in the first > place?

Re: [PATCH] cxl: Perform NULL check for 'cxl_afu *' at various places in cxl

2018-03-13 Thread Frederic Barrat
Le 08/03/2018 à 11:05, Vaibhav Jain a écrit : It is possible for a CXL card to have a valid PSL but no valid AFUs. When this happens we have a valid instance of 'struct cxl' representing the adapter but with its member 'struct cxl_afu *cxl[]' as empty. Unfortunately at many placed within cxl co

Re: [PATCH] cxl: Perform NULL check for 'cxl_afu *' at various places in cxl

2018-03-08 Thread Andrew Donnellan
On 09/03/18 13:59, Vaibhav Jain wrote: Thanks for looking into this patch Andrew, Andrew Donnellan writes: On 08/03/18 21:05, Vaibhav Jain wrote: It is possible for a CXL card to have a valid PSL but no valid AFUs. When this happens we have a valid instance of 'struct cxl' representing the a

Re: [PATCH] cxl: Perform NULL check for 'cxl_afu *' at various places in cxl

2018-03-08 Thread Vaibhav Jain
Thanks for looking into this patch Andrew, Andrew Donnellan writes: > On 08/03/18 21:05, Vaibhav Jain wrote: >> It is possible for a CXL card to have a valid PSL but no valid >> AFUs. When this happens we have a valid instance of 'struct cxl' >> representing the adapter but with its member 'stru

Re: [PATCH] cxl: Perform NULL check for 'cxl_afu *' at various places in cxl

2018-03-08 Thread Andrew Donnellan
On 08/03/18 21:05, Vaibhav Jain wrote: It is possible for a CXL card to have a valid PSL but no valid AFUs. When this happens we have a valid instance of 'struct cxl' representing the adapter but with its member 'struct cxl_afu *cxl[]' as empty. Unfortunately at many placed within cxl code (espec