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

2018-10-26 Thread Christian König
: kbu...@01.org Cc: Julia Lawall Subject: [PATCH] drm: fix call_kern.cocci warnings CC: kbuild-...@01.org CC: intel-...@lists.freedesktop.org CC: dri-devel@lists.freedesktop.org TO: Chunming Zhou CC: "Christian König" CC: Gustavo Padovan CC: Maarten Lankhorst CC: Sean Paul CC: D

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

2018-10-26 Thread Christian König
Am 25.10.18 um 11:35 schrieb 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 t

Re: [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: [PATCH] drm: fix call_kern.cocci warnings v3

2018-10-25 Thread 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_KERNEL >> >>Find functions that refer to GFP_

Re: [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: [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

[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 zhoucm1
On 2018年10月25日 17:38, Christian König wrote: Am 25.10.18 um 11:35 schrieb 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

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

2018-10-25 Thread zhoucm1
On 2018年10月25日 17:30, Koenig, Christian wrote: 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, Chri

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: [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: [PATCH] drm: fix call_kern.cocci warnings v2

2018-10-25 Thread 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 @@ -111,15 +111,16 @@ static struc

Re: [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: [PATCH] drm: fix call_kern.cocci warnings v2

2018-10-25 Thread 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)   {   struct drm_syncobj_signal_pt

Re: [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: [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: [PATCH] drm: fix call_kern.cocci warnings v2

2018-10-25 Thread 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; +    struct drm_syncobj_stub_fence *fence =

Re: [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

Re: [PATCH] drm: fix call_kern.cocci warnings

2018-10-25 Thread zhoucm1
pls ignore this one, please review v2. On 2018年10月25日 16:36, 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 ca

[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

[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: [PATCH] drm: fix call_kern.cocci warnings (fwd)

2018-10-25 Thread zhoucm1
will send a fix soon. Thanks, David On 2018年10月25日 15:57, Koenig, Christian wrote: 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 avoid

Re: [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: [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: [PATCH] drm: fix call_kern.cocci warnings (fwd)

2018-10-25 Thread Maarten Lankhorst
kbu...@01.org > Cc: Julia Lawall > Subject: [PATCH] drm: fix call_kern.cocci warnings > > CC: kbuild-...@01.org > CC: intel-...@lists.freedesktop.org > CC: dri-devel@lists.freedesktop.org > TO: Chunming Zhou > CC: "Christian König" > CC: Gustavo Padovan > CC:

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

2018-10-24 Thread Christian König
: [PATCH] drm: fix call_kern.cocci warnings (fwd) 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: [

RE: [PATCH] drm: fix call_kern.cocci warnings (fwd)

2018-10-24 Thread Zhou, David(ChunMing)
o Padovan > ; Maarten Lankhorst > ; Sean Paul ; David > Airlie ; dri-devel@lists.freedesktop.org; linux- > ker...@vger.kernel.org > Subject: [PATCH] drm: fix call_kern.cocci warnings (fwd) > > The containing function is called with a spin_lock held, so GFP_KERNEL can't > be

[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: k