Re: [PATCH v2] pci: pcie-xilinx: fix a missing-check bug for __get_free_pages

2019-03-26 Thread Robin Murphy
On 23/03/2019 21:04, Aditya Pakki wrote: In case __get_free_pages fail, the fix returns error upstream to avoid NULL pointer dereference. Where does msi_pages ever get dereferenced? The logic here might actually still have a chance of working out OK with NULL depending on how the memory maps

Re: [PATCH v2] pci: pcie-xilinx: fix a missing-check bug for __get_free_pages

2019-03-25 Thread Bjorn Helgaas
Hi Kangjie, Thanks for the patch! Please update the subject line like this: PCI: xilinx: Check for __get_free_pages() failure You can always get a good idea of the style for subject lines by doing something like this: git log --oneline --follow drivers/pci/controller/pcie-xilinx.c On Mon,

[PATCH v2] pci: pcie-xilinx: fix a missing-check bug for __get_free_pages

2019-03-25 Thread Kangjie Lu
In case __get_free_pages fail, the fix returns -ENOMEMto avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Reviewed-by: Steven Price --- v2: caller is redefined to accept the error code, as suggested by Steven Price --- drivers/pci/controller/pcie-xilinx.c | 12 ++-- 1 file cha

Re: [PATCH v2] pci: pcie-xilinx: fix a missing-check bug for __get_free_pages

2019-03-25 Thread Steven Price
On 23/03/2019 21:04, Aditya Pakki wrote: > In case __get_free_pages fail, the fix returns error upstream > to avoid NULL pointer dereference. > > Signed-off-by: Aditya Pakki Reviewed-by: Steven Price > > --- > v1: Return error upstream as suggested by Steven > --- > drivers/pci/controller/pc

[PATCH v2] pci: pcie-xilinx: fix a missing-check bug for __get_free_pages

2019-03-23 Thread Aditya Pakki
In case __get_free_pages fail, the fix returns error upstream to avoid NULL pointer dereference. Signed-off-by: Aditya Pakki --- v1: Return error upstream as suggested by Steven --- drivers/pci/controller/pcie-xilinx.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --gi