Re: [Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings v3

2018-10-25 Thread Maarten Lankhorst
Op 25-10-18 om 14:01 schreef Chunming Zhou: > > 在 2018/10/25 18:36, Maarten Lankhorst 写道: >> Op 25-10-18 om 12:21 schreef Chunming Zhou: >>> drivers/gpu/drm/drm_syncobj.c:202:4-14: ERROR: function >>> drm_syncobj_find_signal_pt_for_point called on line 390 inside lock on line >>> 389 but uses GFP

Re: [Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings v3

2018-10-25 Thread Chris Wilson
Give this a nice summary, drm/syncobj: Avoid kmalloc(GFP_KERNEL) under spinlock Quoting Chunming Zhou (2018-10-25 11:21:05) > drivers/gpu/drm/drm_syncobj.c:202:4-14: ERROR: function > drm_syncobj_find_signal_pt_for_point called on line 390 inside lock on line > 389 but uses GFP_KERNEL > > Fi

Re: [Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings v3

2018-10-25 Thread Koenig, Christian
Am 25.10.18 um 12:36 schrieb Maarten Lankhorst: > Op 25-10-18 om 12:21 schreef Chunming Zhou: >> drivers/gpu/drm/drm_syncobj.c:202:4-14: ERROR: function >> drm_syncobj_find_signal_pt_for_point called on line 390 inside lock on line >> 389 but uses GFP_KERNEL >> >>Find functions that refer to

Re: [Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings v3

2018-10-25 Thread Maarten Lankhorst
Op 25-10-18 om 12:21 schreef Chunming Zhou: > drivers/gpu/drm/drm_syncobj.c:202:4-14: ERROR: function > drm_syncobj_find_signal_pt_for_point called on line 390 inside lock on line > 389 but uses GFP_KERNEL > > Find functions that refer to GFP_KERNEL but are called with locks held. > > Generated

[Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings v3

2018-10-25 Thread Chunming Zhou
drivers/gpu/drm/drm_syncobj.c:202:4-14: ERROR: function drm_syncobj_find_signal_pt_for_point called on line 390 inside lock on line 389 but uses GFP_KERNEL Find functions that refer to GFP_KERNEL but are called with locks held. Generated by: scripts/coccinelle/locks/call_kern.cocci v2: synco

Re: [Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings

2018-10-25 Thread Daniel Vetter
On Thu, Oct 25, 2018 at 04:36:34PM +0800, Chunming Zhou wrote: > drivers/gpu/drm/drm_syncobj.c:202:4-14: ERROR: function > drm_syncobj_find_signal_pt_for_point called on line 390 inside lock on line > 389 but uses GFP_KERNEL > > Find functions that refer to GFP_KERNEL but are called with locks

Re: [Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings v2

2018-10-25 Thread Koenig, Christian
Am 25.10.18 um 11:28 schrieb zhoucm1: On 2018年10月25日 17:23, Koenig, Christian wrote: Am 25.10.18 um 11:20 schrieb zhoucm1: On 2018年10月25日 17:11, Koenig, Christian wrote: Am 25.10.18 um 11:03 schrieb zhoucm1: On 2018年10月25日 16:56, Christian König wrote: +++ b/drivers/gpu/drm/drm_syncobj.c @@ -

Re: [Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings v2

2018-10-25 Thread Koenig, Christian
Am 25.10.18 um 11:20 schrieb zhoucm1: On 2018年10月25日 17:11, Koenig, Christian wrote: Am 25.10.18 um 11:03 schrieb zhoucm1: On 2018年10月25日 16:56, Christian König wrote: +++ b/drivers/gpu/drm/drm_syncobj.c @@ -111,15 +111,16 @@ static struct dma_fence uint64_t point) {

Re: [Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings v2

2018-10-25 Thread Maarten Lankhorst
Op 25-10-18 om 10:53 schreef Chunming Zhou: > drivers/gpu/drm/drm_syncobj.c:202:4-14: ERROR: function > drm_syncobj_find_signal_pt_for_point called on line 390 inside lock on line > 389 but uses GFP_KERNEL > > Find functions that refer to GFP_KERNEL but are called with locks held. > > Semantic

Re: [Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings v2

2018-10-25 Thread Koenig, Christian
Am 25.10.18 um 11:03 schrieb zhoucm1: On 2018年10月25日 16:56, Christian König wrote: +++ b/drivers/gpu/drm/drm_syncobj.c @@ -111,15 +111,16 @@ static struct dma_fence uint64_t point) { struct drm_syncobj_signal_pt *signal_pt; +struct dma_fence *f = NULL; +str

Re: [Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings v2

2018-10-25 Thread Christian König
Am 25.10.18 um 10:53 schrieb Chunming Zhou: drivers/gpu/drm/drm_syncobj.c:202:4-14: ERROR: function drm_syncobj_find_signal_pt_for_point called on line 390 inside lock on line 389 but uses GFP_KERNEL Find functions that refer to GFP_KERNEL but are called with locks held. Semantic patch inf

[Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings v2

2018-10-25 Thread Chunming Zhou
drivers/gpu/drm/drm_syncobj.c:202:4-14: ERROR: function drm_syncobj_find_signal_pt_for_point called on line 390 inside lock on line 389 but uses GFP_KERNEL Find functions that refer to GFP_KERNEL but are called with locks held. Semantic patch information: The proposed change of converting t

[Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings

2018-10-25 Thread Chunming Zhou
drivers/gpu/drm/drm_syncobj.c:202:4-14: ERROR: function drm_syncobj_find_signal_pt_for_point called on line 390 inside lock on line 389 but uses GFP_KERNEL Find functions that refer to GFP_KERNEL but are called with locks held. Semantic patch information: The proposed change of converting t

Re: [Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings (fwd)

2018-10-25 Thread Koenig, Christian
Am 25.10.18 um 09:51 schrieb Maarten Lankhorst: > Op 25-10-18 om 08:53 schreef Christian König: >> Am 25.10.18 um 03:28 schrieb Zhou, David(ChunMing): >>> Reviewed-by: Chunming Zhou >> NAK, GFP_ATOMIC should be avoided. >> >> The correct solution is to move the allocation out of the spinlock or dr

Re: [Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings (fwd)

2018-10-25 Thread Maarten Lankhorst
Op 25-10-18 om 08:53 schreef Christian König: > Am 25.10.18 um 03:28 schrieb Zhou, David(ChunMing): >> Reviewed-by: Chunming Zhou > > NAK, GFP_ATOMIC should be avoided. > > The correct solution is to move the allocation out of the spinlock or drop > the lock and reacquire. Yeah +1. Especially in

Re: [Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings (fwd)

2018-10-25 Thread Maarten Lankhorst
Op 24-10-18 om 20:57 schreef Julia Lawall: > The containing function is called with a spin_lock held, so GFP_KERNEL > can't be used. > > julia > > -- Forwarded message -- > Date: Tue, 23 Oct 2018 17:14:25 +0800 > From: kbuild test robot > To: kbu...@01.org > Cc: Julia Lawall > Sub

Re: [Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings (fwd)

2018-10-24 Thread Zhou, David(ChunMing)
Reviewed-by: Chunming Zhou > -Original Message- > From: Julia Lawall > Sent: Thursday, October 25, 2018 2:57 AM > To: Zhou, David(ChunMing) > Cc: kbuild-...@01.org; intel-gfx@lists.freedesktop.org; dri- > de...@lists.freedesktop.org; Christian König > ; Gustavo Padovan > ; Maarten Lankh

[Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings (fwd)

2018-10-24 Thread Julia Lawall
The containing function is called with a spin_lock held, so GFP_KERNEL can't be used. julia -- Forwarded message -- Date: Tue, 23 Oct 2018 17:14:25 +0800 From: kbuild test robot To: kbu...@01.org Cc: Julia Lawall Subject: [PATCH] drm: fix call_kern.cocci warnings CC: kbuild-...