Re: [PATCH v2 3/7] drm/rockchip: gem: add mutex lock for drm mm

2017-02-07 Thread Mark yao

On 2017年02月07日 20:19, Thierry Reding wrote:

On Tue, Feb 07, 2017 at 04:35:38PM +0800, Mark Yao wrote:

drm_mm_insert_node_generic and drm_mm_remove_node may access same
resource with list ops, it's not threads safe, so protect this context
with mutex lock.

Fix bug:
[49451.856244] 
==
[49451.856350] BUG: KASAN: wild-memory-access on address dead0108
[49451.856379] Write of size 8 by task Binder:218_4/683
[49451.856417] CPU: 2 PID: 683 Comm: Binder:218_4 Not tainted 4.4.36 #62
[49451.856443] Hardware name: Rockchip RK3399 Excavator Board edp (Android) (DT)
[49451.856469] Call trace:
[49451.856519] [] dump_backtrace+0x0/0x230
[49451.856556] [] show_stack+0x14/0x1c
[49451.856592] [] dump_stack+0xa0/0xc8
[49451.856633] [] kasan_report+0x110/0x4dc
[49451.856670] [] __asan_store8+0x24/0x7c
[49451.856715] [] drm_mm_insert_node_generic+0x2dc/0x464
[49451.856760] [] rockchip_gem_iommu_map+0x60/0x158
[49451.856794] [] rockchip_gem_create_object+0x278/0x488
[49451.856827] [] rockchip_gem_create_with_handle+0x24/0x10c
[49451.856862] [] rockchip_gem_create_ioctl+0x3c/0x50
[49451.856896] [] drm_ioctl+0x354/0x52c
[49451.856939] [] do_vfs_ioctl+0x670/0x78c
[49451.856976] [] SyS_ioctl+0x60/0x88
[49451.857009] [] el0_svc_naked+0x24/0x28

Change-Id: I2ea377aa9ca24f70c59e2d86f2a6ad5ccb9c0891

This is meaningless in an upstream tree. Please remove.

Thierry

Right, Forget to remove "Change-Id: "

Thanks.

--
Mark Yao




Re: [PATCH v2 3/7] drm/rockchip: gem: add mutex lock for drm mm

2017-02-07 Thread Mark yao

On 2017年02月07日 20:19, Thierry Reding wrote:

On Tue, Feb 07, 2017 at 04:35:38PM +0800, Mark Yao wrote:

drm_mm_insert_node_generic and drm_mm_remove_node may access same
resource with list ops, it's not threads safe, so protect this context
with mutex lock.

Fix bug:
[49451.856244] 
==
[49451.856350] BUG: KASAN: wild-memory-access on address dead0108
[49451.856379] Write of size 8 by task Binder:218_4/683
[49451.856417] CPU: 2 PID: 683 Comm: Binder:218_4 Not tainted 4.4.36 #62
[49451.856443] Hardware name: Rockchip RK3399 Excavator Board edp (Android) (DT)
[49451.856469] Call trace:
[49451.856519] [] dump_backtrace+0x0/0x230
[49451.856556] [] show_stack+0x14/0x1c
[49451.856592] [] dump_stack+0xa0/0xc8
[49451.856633] [] kasan_report+0x110/0x4dc
[49451.856670] [] __asan_store8+0x24/0x7c
[49451.856715] [] drm_mm_insert_node_generic+0x2dc/0x464
[49451.856760] [] rockchip_gem_iommu_map+0x60/0x158
[49451.856794] [] rockchip_gem_create_object+0x278/0x488
[49451.856827] [] rockchip_gem_create_with_handle+0x24/0x10c
[49451.856862] [] rockchip_gem_create_ioctl+0x3c/0x50
[49451.856896] [] drm_ioctl+0x354/0x52c
[49451.856939] [] do_vfs_ioctl+0x670/0x78c
[49451.856976] [] SyS_ioctl+0x60/0x88
[49451.857009] [] el0_svc_naked+0x24/0x28

Change-Id: I2ea377aa9ca24f70c59e2d86f2a6ad5ccb9c0891

This is meaningless in an upstream tree. Please remove.

Thierry

Right, Forget to remove "Change-Id: "

Thanks.

--
Mark Yao




Re: [PATCH v2 3/7] drm/rockchip: gem: add mutex lock for drm mm

2017-02-07 Thread Thierry Reding
On Tue, Feb 07, 2017 at 04:35:38PM +0800, Mark Yao wrote:
> drm_mm_insert_node_generic and drm_mm_remove_node may access same
> resource with list ops, it's not threads safe, so protect this context
> with mutex lock.
> 
> Fix bug:
> [49451.856244] 
> ==
> [49451.856350] BUG: KASAN: wild-memory-access on address dead0108
> [49451.856379] Write of size 8 by task Binder:218_4/683
> [49451.856417] CPU: 2 PID: 683 Comm: Binder:218_4 Not tainted 4.4.36 #62
> [49451.856443] Hardware name: Rockchip RK3399 Excavator Board edp (Android) 
> (DT)
> [49451.856469] Call trace:
> [49451.856519] [] dump_backtrace+0x0/0x230
> [49451.856556] [] show_stack+0x14/0x1c
> [49451.856592] [] dump_stack+0xa0/0xc8
> [49451.856633] [] kasan_report+0x110/0x4dc
> [49451.856670] [] __asan_store8+0x24/0x7c
> [49451.856715] [] drm_mm_insert_node_generic+0x2dc/0x464
> [49451.856760] [] rockchip_gem_iommu_map+0x60/0x158
> [49451.856794] [] rockchip_gem_create_object+0x278/0x488
> [49451.856827] [] rockchip_gem_create_with_handle+0x24/0x10c
> [49451.856862] [] rockchip_gem_create_ioctl+0x3c/0x50
> [49451.856896] [] drm_ioctl+0x354/0x52c
> [49451.856939] [] do_vfs_ioctl+0x670/0x78c
> [49451.856976] [] SyS_ioctl+0x60/0x88
> [49451.857009] [] el0_svc_naked+0x24/0x28
> 
> Change-Id: I2ea377aa9ca24f70c59e2d86f2a6ad5ccb9c0891

This is meaningless in an upstream tree. Please remove.

Thierry


signature.asc
Description: PGP signature


Re: [PATCH v2 3/7] drm/rockchip: gem: add mutex lock for drm mm

2017-02-07 Thread Thierry Reding
On Tue, Feb 07, 2017 at 04:35:38PM +0800, Mark Yao wrote:
> drm_mm_insert_node_generic and drm_mm_remove_node may access same
> resource with list ops, it's not threads safe, so protect this context
> with mutex lock.
> 
> Fix bug:
> [49451.856244] 
> ==
> [49451.856350] BUG: KASAN: wild-memory-access on address dead0108
> [49451.856379] Write of size 8 by task Binder:218_4/683
> [49451.856417] CPU: 2 PID: 683 Comm: Binder:218_4 Not tainted 4.4.36 #62
> [49451.856443] Hardware name: Rockchip RK3399 Excavator Board edp (Android) 
> (DT)
> [49451.856469] Call trace:
> [49451.856519] [] dump_backtrace+0x0/0x230
> [49451.856556] [] show_stack+0x14/0x1c
> [49451.856592] [] dump_stack+0xa0/0xc8
> [49451.856633] [] kasan_report+0x110/0x4dc
> [49451.856670] [] __asan_store8+0x24/0x7c
> [49451.856715] [] drm_mm_insert_node_generic+0x2dc/0x464
> [49451.856760] [] rockchip_gem_iommu_map+0x60/0x158
> [49451.856794] [] rockchip_gem_create_object+0x278/0x488
> [49451.856827] [] rockchip_gem_create_with_handle+0x24/0x10c
> [49451.856862] [] rockchip_gem_create_ioctl+0x3c/0x50
> [49451.856896] [] drm_ioctl+0x354/0x52c
> [49451.856939] [] do_vfs_ioctl+0x670/0x78c
> [49451.856976] [] SyS_ioctl+0x60/0x88
> [49451.857009] [] el0_svc_naked+0x24/0x28
> 
> Change-Id: I2ea377aa9ca24f70c59e2d86f2a6ad5ccb9c0891

This is meaningless in an upstream tree. Please remove.

Thierry


signature.asc
Description: PGP signature