Re: [PATCH] irqchip/gic-v3: check kasprintf() for failures

2018-04-24 Thread YueHaibing
On 2018/4/24 15:21, Marc Zyngier wrote: > On Tue, 24 Apr 2018 08:10:36 +0100, > YueHaibing wrote: >> >> We should just return -ENOMEM here if the allocation fails, >> otherwise it may cause a panic. > > Can you explain how? From what I can see, node_name is only used as a > parameter to

Re: [PATCH] irqchip/gic-v3: check kasprintf() for failures

2018-04-24 Thread YueHaibing
On 2018/4/24 15:21, Marc Zyngier wrote: > On Tue, 24 Apr 2018 08:10:36 +0100, > YueHaibing wrote: >> >> We should just return -ENOMEM here if the allocation fails, >> otherwise it may cause a panic. > > Can you explain how? From what I can see, node_name is only used as a > parameter to

Re: [PATCH] irqchip/gic-v3: check kasprintf() for failures

2018-04-24 Thread Marc Zyngier
On Tue, 24 Apr 2018 08:10:36 +0100, YueHaibing wrote: > > We should just return -ENOMEM here if the allocation fails, > otherwise it may cause a panic. Can you explain how? From what I can see, node_name is only used as a parameter to pr_err/pr_info, which will perfectly deal with it by printing

Re: [PATCH] irqchip/gic-v3: check kasprintf() for failures

2018-04-24 Thread Marc Zyngier
On Tue, 24 Apr 2018 08:10:36 +0100, YueHaibing wrote: > > We should just return -ENOMEM here if the allocation fails, > otherwise it may cause a panic. Can you explain how? From what I can see, node_name is only used as a parameter to pr_err/pr_info, which will perfectly deal with it by printing

[PATCH] irqchip/gic-v3: check kasprintf() for failures

2018-04-24 Thread YueHaibing
We should just return -ENOMEM here if the allocation fails, otherwise it may cause a panic. Signed-off-by: YueHaibing --- drivers/irqchip/irq-gic-v3-its-pci-msi.c | 3 +++ drivers/irqchip/irq-gic-v3-its-platform-msi.c | 3 +++ 2 files changed, 6 insertions(+) diff

[PATCH] irqchip/gic-v3: check kasprintf() for failures

2018-04-24 Thread YueHaibing
We should just return -ENOMEM here if the allocation fails, otherwise it may cause a panic. Signed-off-by: YueHaibing --- drivers/irqchip/irq-gic-v3-its-pci-msi.c | 3 +++ drivers/irqchip/irq-gic-v3-its-platform-msi.c | 3 +++ 2 files changed, 6 insertions(+) diff --git