Re: [PATCH v2] staging: gdm724x: Fix DMA from stack

2021-02-10 Thread Amey Narkhede
On 21/02/10 10:09AM, Greg KH wrote: > On Wed, Feb 10, 2021 at 02:28:11PM +0530, Amey Narkhede wrote: > > On 21/02/10 09:06AM, Greg KH wrote: > > > On Wed, Feb 10, 2021 at 01:31:34PM +0530, Amey Narkhede wrote: > > > > Stack allocated buffers cannot be used for DMA > > > > on all architectures so

Re: [PATCH v2] staging: gdm724x: Fix DMA from stack

2021-02-10 Thread Amey Narkhede
On 21/02/10 12:04PM, Dan Carpenter wrote: > On Wed, Feb 10, 2021 at 02:28:11PM +0530, Amey Narkhede wrote: > > On 21/02/10 09:06AM, Greg KH wrote: > > > On Wed, Feb 10, 2021 at 01:31:34PM +0530, Amey Narkhede wrote: > > > > Stack allocated buffers cannot be used for DMA > > > > on all

Re: [PATCH v2] staging: gdm724x: Fix DMA from stack

2021-02-10 Thread Greg KH
On Wed, Feb 10, 2021 at 02:28:11PM +0530, Amey Narkhede wrote: > On 21/02/10 09:06AM, Greg KH wrote: > > On Wed, Feb 10, 2021 at 01:31:34PM +0530, Amey Narkhede wrote: > > > Stack allocated buffers cannot be used for DMA > > > on all architectures so allocate hci_packet buffer > > > using

Re: [PATCH v2] staging: gdm724x: Fix DMA from stack

2021-02-10 Thread Dan Carpenter
On Wed, Feb 10, 2021 at 02:28:11PM +0530, Amey Narkhede wrote: > On 21/02/10 09:06AM, Greg KH wrote: > > On Wed, Feb 10, 2021 at 01:31:34PM +0530, Amey Narkhede wrote: > > > Stack allocated buffers cannot be used for DMA > > > on all architectures so allocate hci_packet buffer > > > using

Re: [PATCH v2] staging: gdm724x: Fix DMA from stack

2021-02-10 Thread Amey Narkhede
On 21/02/10 09:06AM, Greg KH wrote: > On Wed, Feb 10, 2021 at 01:31:34PM +0530, Amey Narkhede wrote: > > Stack allocated buffers cannot be used for DMA > > on all architectures so allocate hci_packet buffer > > using kzalloc(). > > > > Signed-off-by: Amey Narkhede > > --- > > Changes in v2: > >

Re: [PATCH v2] staging: gdm724x: Fix DMA from stack

2021-02-10 Thread Greg KH
On Wed, Feb 10, 2021 at 01:31:34PM +0530, Amey Narkhede wrote: > Stack allocated buffers cannot be used for DMA > on all architectures so allocate hci_packet buffer > using kzalloc(). > > Signed-off-by: Amey Narkhede > --- > Changes in v2: > - Fixed build warning > - Fixed memory

[PATCH v2] staging: gdm724x: Fix DMA from stack

2021-02-10 Thread Amey Narkhede
Stack allocated buffers cannot be used for DMA on all architectures so allocate hci_packet buffer using kzalloc(). Signed-off-by: Amey Narkhede --- Changes in v2: - Fixed build warning - Fixed memory leak using kfree drivers/staging/gdm724x/gdm_usb.c | 9 +++-- 1 file

Re: [PATCH v2] staging: gdm724x: Fix DMA from stack

2021-02-09 Thread Greg KH
On Wed, Feb 10, 2021 at 01:01:47AM +0530, ameynarkhed...@gmail.com wrote: > From: Amey Narkhede > > Stack allocated buffers cannot be used for DMA > on all architectures so allocate hci_packet buffer > using kzalloc(). > > Signed-off-by: Amey Narkhede > --- > drivers/staging/gdm724x/gdm_usb.c

[PATCH v2] staging: gdm724x: Fix DMA from stack

2021-02-09 Thread ameynarkhede03
From: Amey Narkhede Stack allocated buffers cannot be used for DMA on all architectures so allocate hci_packet buffer using kzalloc(). Signed-off-by: Amey Narkhede --- drivers/staging/gdm724x/gdm_usb.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git