[PATCH] staging: gdm72xx: fix leaks at failure path in gdm_usb_probe()

2014-02-05 Thread Alexey Khoroshilov
Error handling code in gdm_usb_probe() misses to deallocate tx_ and rx_structs and to do usb_put_dev(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/staging/gdm72xx/gdm_usb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a

[PATCH] staging: line6: do not return 0 from probe if no initialization done

2014-06-10 Thread Alexey Khoroshilov
There is a strange "return 0" in line6_probe() before any initialization of the module is done. It can lead to NULL pointer dereference in other functions. The patch proposes to return -ENODEV in this case. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-

[PATCH] staging: gdm724x: fix leak at failure path in init_usb()

2014-07-10 Thread Alexey Khoroshilov
(linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/staging/gdm724x/gdm_usb.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/staging/gdm724x/gdm_usb.c b/drivers/staging/gdm724x/gdm_usb.c index ee6e40facca7..ea89d530ff3f 100644 --- a/drivers

staging: ion: ION allocation fall back order depends on heap linkage order

2018-01-28 Thread Alexey Skidanov
depends on the order of linkage. Probably, it's better to let the user to define the fall back order (and NOT to be dependent on the linkage order at all) ? Thanks, Alexey ___ devel mailing list de...@linuxdriverproject.org http://driverdev.lin

[PATCH] staging: android: ion: Add implementation of dma_buf_vmap and dma_buf_vunmap

2018-01-30 Thread Alexey Skidanov
Signed-off-by: Alexey Skidanov --- drivers/staging/android/ion/ion.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index f480885..4f1dc7f 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers

[PATCH v2] staging: android: ion: Add implementation of dma_buf_vmap and dma_buf_vunmap

2018-01-30 Thread Alexey Skidanov
dma_buf_vmap and dma_buf_vunmap allow drivers to access buffers, created by ion. Signed-off-by: Alexey Skidanov --- Changes in v1: - Added changelog text drivers/staging/android/ion/ion.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/staging/android/ion/ion.c b

[PATCH v3] staging: android: ion: Add implementation of dma_buf_vmap and dma_buf_vunmap

2018-01-31 Thread Alexey Skidanov
Any driver may access shared buffers, created by ion, using dma_buf_vmap and dma_buf_vunmap dma-buf API that maps/unmaps previosuly allocated buffers into the kernel virtual address space. The implementation of these API is missing in the current ion implementation. Signed-off-by: Alexey Skidanov

Re: [PATCH v3] staging: android: ion: Add implementation of dma_buf_vmap and dma_buf_vunmap

2018-01-31 Thread Alexey Skidanov
On 01/31/2018 03:00 PM, Greg KH wrote: On Wed, Jan 31, 2018 at 02:03:42PM +0200, Alexey Skidanov wrote: Any driver may access shared buffers, created by ion, using dma_buf_vmap and dma_buf_vunmap dma-buf API that maps/unmaps previosuly allocated buffers into the kernel virtual address space

Re: [PATCH v3] staging: android: ion: Add implementation of dma_buf_vmap and dma_buf_vunmap

2018-02-06 Thread Alexey Skidanov
On 02/07/2018 01:56 AM, Laura Abbott wrote: > On 01/31/2018 10:10 PM, Alexey Skidanov wrote: >> >> On 01/31/2018 03:00 PM, Greg KH wrote: >>> On Wed, Jan 31, 2018 at 02:03:42PM +0200, Alexey Skidanov wrote: >>>> Any driver may access shared buffers, created

Re: staging: ion: ION allocation fall back order depends on heap linkage order

2018-02-06 Thread Alexey Skidanov
rrent API (allocation IOCTL) requires to specify the particular heap object by using heap id. From the other hand, the user space doesn't control the heaps creation order and heap id assignment. So it may be tricky, especially when more than o

Re: staging: ion: ION allocation fall back order depends on heap linkage order

2018-02-07 Thread Alexey Skidanov
On 02/07/2018 04:58 PM, Laura Abbott wrote: > On 02/06/2018 11:05 PM, Alexey Skidanov wrote: >> >> >>> Yup, you've hit upon a key problem. Having fallbacks be stable >>> was always a problem and the recommendation these days is to >>> not rel

Re: staging: ion: ION allocation fall back order depends on heap linkage order

2018-02-07 Thread Alexey Skidanov
On 02/07/2018 05:32 PM, Laura Abbott wrote: > On 02/07/2018 07:10 AM, Alexey Skidanov wrote: >> >> >> On 02/07/2018 04:58 PM, Laura Abbott wrote: >>> On 02/06/2018 11:05 PM, Alexey Skidanov wrote: >>>> >>>> >>>>> Yup, you

ion kernel mapping implementation

2018-02-10 Thread Alexey Skidanov
at a time. So, probably it's better to implement dma_buf_kmap() by kmap() and not by vmap()? Thanks, Alexey ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH] staging: android: ion: Add requested allocation alignment

2018-02-10 Thread Alexey Skidanov
emory fragmentation and in some cases it may avoid the allocation request failure. To fix this, we add an alignment parameter to the allocation ioctl. Signed-off-by: Alexey Skidanov --- drivers/staging/android/ion/ion-ioctl.c | 3 ++- drivers/staging/android/ion/ion.c

Re: [PATCH] staging: android: ion: Add requested allocation alignment

2018-02-12 Thread Alexey Skidanov
On 02/12/2018 08:42 PM, Laura Abbott wrote: > On 02/10/2018 02:17 AM, Alexey Skidanov wrote: >> Current ion defined allocation ioctl doesn't allow to specify the >> requested >> allocation alignment. CMA heap allocates buffers aligned on buffer size >> page order

Re: ion kernel mapping implementation

2018-02-12 Thread Alexey Skidanov
On 02/12/2018 08:30 PM, Laura Abbott wrote: > On 02/10/2018 01:43 AM, Alexey Skidanov wrote: >> Hi, >> >> Current ion kernel mapping implementation uses vmap() to map previously >> allocated buffers into kernel virtual address space. On 32 bit >> platforms,

Re: [PATCH] staging: android: ion: Add requested allocation alignment

2018-02-12 Thread Alexey Skidanov
On 02/12/2018 09:52 PM, Laura Abbott wrote: > On 02/12/2018 11:11 AM, Alexey Skidanov wrote: >> >> On 02/12/2018 08:42 PM, Laura Abbott wrote: >>> On 02/10/2018 02:17 AM, Alexey Skidanov wrote: >>>> Current ion defined allocation ioctl doesn't allow to s

Re: ion kernel mapping implementation

2018-02-12 Thread Alexey Skidanov
On 02/12/2018 10:09 PM, Laura Abbott wrote: > On 02/12/2018 11:21 AM, Alexey Skidanov wrote: >> >> >> On 02/12/2018 08:30 PM, Laura Abbott wrote: >>> On 02/10/2018 01:43 AM, Alexey Skidanov wrote: >>>> Hi, >>>> >>>> Curre

Re: [PATCH] staging: android: ion: Add requested allocation alignment

2018-02-12 Thread Alexey Skidanov
On 02/12/2018 10:46 PM, Laura Abbott wrote: > On 02/12/2018 12:22 PM, Alexey Skidanov wrote: >> >> >> On 02/12/2018 09:52 PM, Laura Abbott wrote: >>> On 02/12/2018 11:11 AM, Alexey Skidanov wrote: >>>> >>>> On 02/12/2018 08:42 PM, Laura Abbot

[PATCH] staging: android: ion: Change dma_buf_kmap()/dma_buf_kmap_atomic() implementation

2018-02-12 Thread Alexey Skidanov
time. To fix this, kmap()/kmap_atomic() is used to implement the appropriate interfaces. Signed-off-by: Alexey Skidanov --- drivers/staging/android/ion/ion.c | 97 +++ drivers/staging/android/ion/ion.h | 1 - 2 files changed, 48 insertions(+), 50 deletions

staging: android: ion: potential coherency issue

2018-02-12 Thread Alexey Skidanov
- DMA read or - DMA write - read from the buffer may be problematic. Thanks, Alexey ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: staging: android: ion: potential coherency issue

2018-02-13 Thread Alexey Skidanov
On 02/13/2018 08:40 PM, Laura Abbott wrote: > On 02/12/2018 11:24 PM, Alexey Skidanov wrote: >> Hello, >> >> Correct me if I'm wrong, but there is no user space interface, similar >> to the dma_buf_start_cpu_access()/dma_buf_end_cpu_access() to handle IO >>

Re: [PATCH] staging: android: ion: Change dma_buf_kmap()/dma_buf_kmap_atomic() implementation

2018-02-16 Thread Alexey Skidanov
On 02/16/2018 01:48 AM, Laura Abbott wrote: > On 02/12/2018 02:33 PM, Alexey Skidanov wrote: >> Current ion kernel mapping implementation uses vmap() to map previously >> allocated buffers into kernel virtual address space. >> >> On 32-bit platforms, vmap() might fail

Re: [PATCH] staging: android: ion: Change dma_buf_kmap()/dma_buf_kmap_atomic() implementation

2018-02-16 Thread Alexey Skidanov
On 02/16/2018 04:46 PM, Greg KH wrote: > On Tue, Feb 13, 2018 at 12:33:53AM +0200, Alexey Skidanov wrote: >> Current ion kernel mapping implementation uses vmap() to map previously >> allocated buffers into kernel virtual address space. >> >> On 32-bit platforms,

Re: [PATCH] staging: android: ion: Change dma_buf_kmap()/dma_buf_kmap_atomic() implementation

2018-02-16 Thread Alexey Skidanov
On 02/16/2018 10:49 PM, Greg KH wrote: > On Fri, Feb 16, 2018 at 10:43:03PM +0200, Alexey Skidanov wrote: >> >> >> On 02/16/2018 04:46 PM, Greg KH wrote: >>> On Tue, Feb 13, 2018 at 12:33:53AM +0200, Alexey Skidanov wrote: >>>> Current ion kernel

Re: [PATCH] staging: android: ion: Change dma_buf_kmap()/dma_buf_kmap_atomic() implementation

2018-02-17 Thread Alexey Skidanov
On 02/17/2018 01:54 AM, Laura Abbott wrote: > On 02/16/2018 04:17 AM, Alexey Skidanov wrote: >> >> >> On 02/16/2018 01:48 AM, Laura Abbott wrote: >>> On 02/12/2018 02:33 PM, Alexey Skidanov wrote: >>>> Current ion kernel mapping implementation uses vmap(

<    1   2