Re: [PATCH v2] usb: gadget: aspeed_udc: Add check for dma_alloc_coherent

2022-12-14 Thread Greg KH
On Wed, Dec 14, 2022 at 10:54:14AM +0800, Jiasheng Jiang wrote: > Add the check for the return value of dma_alloc_coherent in order to > avoid NULL pointer dereference. > > This flaw was found using an experimental static analysis tool we are > developing, APP-Miner, which has not been disclosed.

[PATCH v2] usb: gadget: aspeed_udc: Add check for dma_alloc_coherent

2022-12-13 Thread Jiasheng Jiang
Add the check for the return value of dma_alloc_coherent in order to avoid NULL pointer dereference. This flaw was found using an experimental static analysis tool we are developing, APP-Miner, which has not been disclosed. The allyesconfig build using GCC 9.3.0 shows no new warning. As we don't

Re: [PATCH v2] usb: gadget: aspeed_udc: Add check for dma_alloc_coherent

2022-12-13 Thread Greg KH
On Tue, Dec 13, 2022 at 08:21:16PM +0800, Jiasheng Jiang wrote: > Add the check for the return value of dma_alloc_coherent > in order to avoid NULL pointer dereference. > > Fixes: 055276c13205 ("usb: gadget: add Aspeed ast2600 udc driver") > Signed-off-by: Jiasheng Jiang Again, please prove that

[PATCH v2] usb: gadget: aspeed_udc: Add check for dma_alloc_coherent

2022-12-13 Thread Jiasheng Jiang
Add the check for the return value of dma_alloc_coherent in order to avoid NULL pointer dereference. Fixes: 055276c13205 ("usb: gadget: add Aspeed ast2600 udc driver") Signed-off-by: Jiasheng Jiang --- Changelog: v1 -> v2: 1. Add "goto err;" when allocation fails. --- drivers/usb/gadget/udc/as