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

2022-12-23 Thread Jiasheng Jiang
On Fri, Dec 23, 2022 at 10:54:37PM +0800, Greg KH wrote: >> diff --git a/drivers/usb/gadget/udc/aspeed_udc.c >> b/drivers/usb/gadget/udc/aspeed_udc.c >> index 01968e2167f9..7dc2457c7460 100644 >> --- a/drivers/usb/gadget/udc/aspeed_udc.c >> +++ b/drivers/usb/gadget/udc/aspeed_udc.c >> @@ -1516,6 +

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

2022-12-23 Thread Greg KH
On Sat, Dec 24, 2022 at 10:50:01AM +0800, Jiasheng Jiang wrote: > Yes, it is the same as mine. > As the previous patch had not been merged into the Linux kernel, > my tool found the same error and report it. > And both of us chose the most concise way to fix the error. > That is why the patches are

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

2022-12-23 Thread Jiasheng Jiang
Yes, it is the same as mine. As the previous patch had not been merged into the Linux kernel, my tool found the same error and report it. And both of us chose the most concise way to fix the error. That is why the patches are the same. Thanks, Jiang

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

2022-12-23 Thread Greg KH
On Thu, Dec 15, 2022 at 08:31:12PM +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 v3] usb: gadget: aspeed_udc: Add check for dma_alloc_coherent

2022-12-15 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