Hi Suzuki, > -----Original Message----- > From: Suzuki K Poulose [mailto:[email protected]] > Sent: 11 January 2019 09:42 > To: Shameerali Kolothum Thodi <[email protected]>; > [email protected]; [email protected] > Cc: [email protected]; [email protected]; > [email protected]; Guohanjun (Hanjun Guo) > <[email protected]>; John Garry <[email protected]>; > [email protected]; Linuxarm <[email protected]> > Subject: Re: [PATCH v3] irqchip: gicv3-its: Use NUMA aware memory allocation > for ITS tables >
[...] > > drivers/irqchip/irq-gic-v3-its.c | 20 ++++++++++++-------- > > 1 file changed, 12 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/irqchip/irq-gic-v3-its.c > > b/drivers/irqchip/irq-gic-v3-its.c > > index db20e99..ab01061 100644 > > --- a/drivers/irqchip/irq-gic-v3-its.c > > +++ b/drivers/irqchip/irq-gic-v3-its.c > > @@ -1749,7 +1749,8 @@ static int its_setup_baser(struct its_node *its, > struct its_baser *baser, > > order = get_order(GITS_BASER_PAGES_MAX * psz); > > } > > > > - base = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, order); > > + base = (void *)page_address(alloc_pages_node(its->numa_node, > > + GFP_KERNEL | __GFP_ZERO, order)); > > If alloc_pages_node() fails, the page_address() could crash the system. > > > - its->cmd_base = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, > > - get_order(ITS_CMD_QUEUE_SZ)); > > + its->cmd_base = (void > *)page_address(alloc_pages_node(its->numa_node, > > + GFP_KERNEL | __GFP_ZERO, > > + get_order(ITS_CMD_QUEUE_SZ))); > > Similarly here. We may want to handle it properly. Ah..good catch. I will change it and rebase on top of 5.0-rc1 as suggested by Marc. Thanks, Shameer

