All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: Reorder set_property_atomic to avoid returning with an active ww_ctx
@ 2018-12-30 12:28 Chris Wilson
  2018-12-30 13:11 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Chris Wilson @ 2018-12-30 12:28 UTC (permalink / raw)
  To: dri-devel
  Cc: intel-gfx, Chris Wilson, syzbot+6ea337c427f5083ebdf2,
	Daniel Vetter, Maarten Lankhorst, Sean Paul, David Airlie,
	stable

Delay the drm_modeset_acquire_init() until after we check for an
allocation failure so that we can return immediately upon error without
having to unwind.

WARNING: lock held when returning to user space!
4.20.0+ #174 Not tainted
------------------------------------------------
syz-executor556/8153 is leaving the kernel with locks still held!
1 lock held by syz-executor556/8153:
  #0: 000000005100c85c (crtc_ww_class_acquire){+.+.}, at:
set_property_atomic+0xb3/0x330 drivers/gpu/drm/drm_mode_object.c:462

Reported-by: syzbot+6ea337c427f5083ebdf2@syzkaller.appspotmail.com
Fixes: 144a7999d633 ("drm: Handle properties in the core for atomic drivers")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: <stable@vger.kernel.org> # v4.14+
---
 drivers/gpu/drm/drm_mode_object.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c
index bb1dd46496cd..a9005c1c2384 100644
--- a/drivers/gpu/drm/drm_mode_object.c
+++ b/drivers/gpu/drm/drm_mode_object.c
@@ -459,12 +459,13 @@ static int set_property_atomic(struct drm_mode_object *obj,
 	struct drm_modeset_acquire_ctx ctx;
 	int ret;
 
-	drm_modeset_acquire_init(&ctx, 0);
-
 	state = drm_atomic_state_alloc(dev);
 	if (!state)
 		return -ENOMEM;
+
+	drm_modeset_acquire_init(&ctx, 0);
 	state->acquire_ctx = &ctx;
+
 retry:
 	if (prop == state->dev->mode_config.dpms_property) {
 		if (obj->type != DRM_MODE_OBJECT_CONNECTOR) {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* ✓ Fi.CI.BAT: success for drm: Reorder set_property_atomic to avoid returning with an active ww_ctx
  2018-12-30 12:28 [PATCH] drm: Reorder set_property_atomic to avoid returning with an active ww_ctx Chris Wilson
@ 2018-12-30 13:11 ` Patchwork
  2018-12-30 14:31 ` ✓ Fi.CI.IGT: " Patchwork
  2019-01-03  9:03 ` [PATCH] " Maarten Lankhorst
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-12-30 13:11 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm: Reorder set_property_atomic to avoid returning with an active ww_ctx
URL   : https://patchwork.freedesktop.org/series/54547/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5349 -> Patchwork_11169
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/54547/revisions/1/mbox/

Known issues
------------

  Here are the changes found in Patchwork_11169 that come from known issues:

### IGT changes ###

#### Possible fixes ####

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       FAIL [fdo#108767] -> PASS

  * igt@prime_vgem@basic-fence-flip:
    - fi-kbl-7567u:       FAIL [fdo#104008] -> PASS

  
  [fdo#104008]: https://bugs.freedesktop.org/show_bug.cgi?id=104008
  [fdo#108767]: https://bugs.freedesktop.org/show_bug.cgi?id=108767


Participating hosts (46 -> 36)
------------------------------

  Missing    (10): fi-kbl-soraka fi-hsw-4770r fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-pnv-d510 fi-kbl-7560u fi-bdw-samus 


Build changes
-------------

    * Linux: CI_DRM_5349 -> Patchwork_11169

  CI_DRM_5349: 28f592191f34b55d93b2e8e94f2815be0f6c7598 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4754: a176905d46d072300ba57f29ac2b98a0228e0e2d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_11169: a4cc80e8183b69481cbb7ebb4fd9a44418959fdf @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

a4cc80e8183b drm: Reorder set_property_atomic to avoid returning with an active ww_ctx

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_11169/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* ✓ Fi.CI.IGT: success for drm: Reorder set_property_atomic to avoid returning with an active ww_ctx
  2018-12-30 12:28 [PATCH] drm: Reorder set_property_atomic to avoid returning with an active ww_ctx Chris Wilson
  2018-12-30 13:11 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-12-30 14:31 ` Patchwork
  2019-01-03  9:03 ` [PATCH] " Maarten Lankhorst
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-12-30 14:31 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm: Reorder set_property_atomic to avoid returning with an active ww_ctx
URL   : https://patchwork.freedesktop.org/series/54547/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5349_full -> Patchwork_11169_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Known issues
------------

  Here are the changes found in Patchwork_11169_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_isolation@vecs0-s3:
    - shard-skl:          PASS -> INCOMPLETE [fdo#104108] / [fdo#107773]

  * igt@gem_fence_thrash@bo-write-verify-threaded-x:
    - shard-hsw:          PASS -> INCOMPLETE [fdo#103540]

  * igt@kms_chv_cursor_fail@pipe-c-128x128-bottom-edge:
    - shard-skl:          PASS -> FAIL [fdo#104671] +1

  * igt@kms_cursor_crc@cursor-128x128-random:
    - shard-apl:          PASS -> FAIL [fdo#103232] +2

  * igt@kms_cursor_crc@cursor-256x256-suspend:
    - shard-apl:          PASS -> FAIL [fdo#103191] / [fdo#103232]

  * igt@kms_cursor_crc@cursor-64x64-random:
    - shard-iclb:         NOTRUN -> FAIL [fdo#103232]

  * igt@kms_cursor_crc@cursor-64x64-suspend:
    - shard-skl:          PASS -> INCOMPLETE [fdo#104108]

  * igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
    - shard-hsw:          PASS -> FAIL [fdo#105767]

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-gtt:
    - shard-apl:          PASS -> FAIL [fdo#103167]

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-indfb-draw-pwrite:
    - shard-skl:          NOTRUN -> FAIL [fdo#105682]

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-wc:
    - shard-iclb:         PASS -> FAIL [fdo#103167] +3

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-c-frame-sequence:
    - shard-skl:          PASS -> FAIL [fdo#103191] / [fdo#107362]

  * igt@kms_plane@pixel-format-pipe-b-planes-source-clamping:
    - shard-iclb:         NOTRUN -> FAIL [fdo#108948]

  * igt@kms_plane@pixel-format-pipe-c-planes-source-clamping:
    - shard-skl:          NOTRUN -> DMESG-WARN [fdo#106885]

  * igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:
    - shard-skl:          NOTRUN -> FAIL [fdo#108145]

  * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
    - shard-skl:          PASS -> FAIL [fdo#107815]

  * igt@kms_plane_multiple@atomic-pipe-c-tiling-x:
    - shard-iclb:         PASS -> FAIL [fdo#103166]

  * igt@kms_plane_scaling@pipe-a-scaler-with-pixel-format:
    - shard-iclb:         PASS -> DMESG-WARN [fdo#107724]

  * igt@kms_rotation_crc@multiplane-rotation-cropping-top:
    - shard-kbl:          PASS -> DMESG-WARN [fdo#105604]

  * igt@kms_setmode@basic:
    - shard-kbl:          PASS -> FAIL [fdo#99912]

  * igt@kms_sysfs_edid_timing:
    - shard-iclb:         PASS -> FAIL [fdo#100047]

  * igt@perf_pmu@rc6-runtime-pm:
    - shard-iclb:         PASS -> FAIL [fdo#105010]

  * igt@pm_rpm@gem-mmap-cpu:
    - shard-skl:          PASS -> INCOMPLETE [fdo#107807]

  * igt@pm_rpm@universal-planes-dpms:
    - shard-iclb:         PASS -> DMESG-WARN [fdo#108654]

  
#### Possible fixes ####

  * igt@gem_userptr_blits@readonly-unsync:
    - shard-iclb:         TIMEOUT [fdo#108887] -> PASS

  * igt@i915_suspend@forcewake:
    - shard-skl:          INCOMPLETE [fdo#104108] / [fdo#107773] -> PASS

  * igt@kms_atomic_transition@plane-all-modeset-transition-internal-panels:
    - shard-iclb:         DMESG-WARN [fdo#107724] -> PASS +11

  * igt@kms_busy@extended-modeset-hang-newfb-render-b:
    - shard-iclb:         DMESG-WARN [fdo#107956] -> PASS

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
    - shard-snb:          DMESG-WARN [fdo#107956] -> SKIP

  * igt@kms_cursor_crc@cursor-128x42-random:
    - shard-apl:          FAIL [fdo#103232] -> PASS +1

  * igt@kms_draw_crc@draw-method-xrgb8888-render-ytiled:
    - shard-iclb:         FAIL [fdo#103232] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-fullscreen:
    - shard-apl:          FAIL [fdo#103167] -> PASS +1

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-mmap-gtt:
    - shard-iclb:         DMESG-FAIL [fdo#107724] -> PASS +2

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-pwrite:
    - shard-iclb:         FAIL [fdo#103167] -> PASS +3

  * igt@kms_plane@plane-panning-top-left-pipe-b-planes:
    - shard-iclb:         DMESG-WARN [fdo#107724] / [fdo#108336] -> PASS +2

  * igt@pm_rpm@pm-caching:
    - shard-skl:          INCOMPLETE [fdo#107807] -> PASS

  
#### Warnings ####

  * igt@i915_selftest@live_contexts:
    - shard-iclb:         INCOMPLETE [fdo#108315] -> DMESG-FAIL [fdo#108569]

  * igt@kms_content_protection@atomic:
    - shard-apl:          INCOMPLETE [fdo#103927] -> FAIL [fdo#108597]

  * igt@kms_cursor_crc@cursor-256x256-suspend:
    - shard-iclb:         DMESG-FAIL [fdo#103232] / [fdo#107724] -> FAIL [fdo#103232]

  
  [fdo#100047]: https://bugs.freedesktop.org/show_bug.cgi?id=100047
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
  [fdo#104671]: https://bugs.freedesktop.org/show_bug.cgi?id=104671
  [fdo#105010]: https://bugs.freedesktop.org/show_bug.cgi?id=105010
  [fdo#105604]: https://bugs.freedesktop.org/show_bug.cgi?id=105604
  [fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
  [fdo#105767]: https://bugs.freedesktop.org/show_bug.cgi?id=105767
  [fdo#106885]: https://bugs.freedesktop.org/show_bug.cgi?id=106885
  [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#107773]: https://bugs.freedesktop.org/show_bug.cgi?id=107773
  [fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
  [fdo#107815]: https://bugs.freedesktop.org/show_bug.cgi?id=107815
  [fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108315]: https://bugs.freedesktop.org/show_bug.cgi?id=108315
  [fdo#108336]: https://bugs.freedesktop.org/show_bug.cgi?id=108336
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [fdo#108597]: https://bugs.freedesktop.org/show_bug.cgi?id=108597
  [fdo#108654]: https://bugs.freedesktop.org/show_bug.cgi?id=108654
  [fdo#108887]: https://bugs.freedesktop.org/show_bug.cgi?id=108887
  [fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (7 -> 7)
------------------------------

  No changes in participating hosts


Build changes
-------------

    * Linux: CI_DRM_5349 -> Patchwork_11169

  CI_DRM_5349: 28f592191f34b55d93b2e8e94f2815be0f6c7598 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4754: a176905d46d072300ba57f29ac2b98a0228e0e2d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_11169: a4cc80e8183b69481cbb7ebb4fd9a44418959fdf @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_11169/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm: Reorder set_property_atomic to avoid returning with an active ww_ctx
  2018-12-30 12:28 [PATCH] drm: Reorder set_property_atomic to avoid returning with an active ww_ctx Chris Wilson
  2018-12-30 13:11 ` ✓ Fi.CI.BAT: success for " Patchwork
  2018-12-30 14:31 ` ✓ Fi.CI.IGT: " Patchwork
@ 2019-01-03  9:03 ` Maarten Lankhorst
  2019-01-03 10:16   ` Chris Wilson
  2 siblings, 1 reply; 6+ messages in thread
From: Maarten Lankhorst @ 2019-01-03  9:03 UTC (permalink / raw)
  To: Chris Wilson, dri-devel
  Cc: intel-gfx, syzbot+6ea337c427f5083ebdf2, Daniel Vetter, Sean Paul,
	David Airlie, stable

Op 30-12-2018 om 13:28 schreef Chris Wilson:
> Delay the drm_modeset_acquire_init() until after we check for an
> allocation failure so that we can return immediately upon error without
> having to unwind.
>
> WARNING: lock held when returning to user space!
> 4.20.0+ #174 Not tainted
> ------------------------------------------------
> syz-executor556/8153 is leaving the kernel with locks still held!
> 1 lock held by syz-executor556/8153:
>   #0: 000000005100c85c (crtc_ww_class_acquire){+.+.}, at:
> set_property_atomic+0xb3/0x330 drivers/gpu/drm/drm_mode_object.c:462
>
> Reported-by: syzbot+6ea337c427f5083ebdf2@syzkaller.appspotmail.com
> Fixes: 144a7999d633 ("drm: Handle properties in the core for atomic drivers")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: David Airlie <airlied@linux.ie>
> Cc: <stable@vger.kernel.org> # v4.14+
> ---
>  drivers/gpu/drm/drm_mode_object.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c
> index bb1dd46496cd..a9005c1c2384 100644
> --- a/drivers/gpu/drm/drm_mode_object.c
> +++ b/drivers/gpu/drm/drm_mode_object.c
> @@ -459,12 +459,13 @@ static int set_property_atomic(struct drm_mode_object *obj,
>  	struct drm_modeset_acquire_ctx ctx;
>  	int ret;
>  
> -	drm_modeset_acquire_init(&ctx, 0);
> -
>  	state = drm_atomic_state_alloc(dev);
>  	if (!state)
>  		return -ENOMEM;
> +
> +	drm_modeset_acquire_init(&ctx, 0);
>  	state->acquire_ctx = &ctx;
> +
>  retry:
>  	if (prop == state->dev->mode_config.dpms_property) {
>  		if (obj->type != DRM_MODE_OBJECT_CONNECTOR) {

Woops only now see you did the same.. :)

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm: Reorder set_property_atomic to avoid returning with an active ww_ctx
  2019-01-03  9:03 ` [PATCH] " Maarten Lankhorst
@ 2019-01-03 10:16   ` Chris Wilson
  2019-01-07 10:30     ` Daniel Vetter
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2019-01-03 10:16 UTC (permalink / raw)
  To: Maarten Lankhorst, dri-devel
  Cc: intel-gfx, syzbot+6ea337c427f5083ebdf2, Daniel Vetter, Sean Paul,
	David Airlie, stable

Quoting Maarten Lankhorst (2019-01-03 09:03:27)
> Op 30-12-2018 om 13:28 schreef Chris Wilson:
> > Delay the drm_modeset_acquire_init() until after we check for an
> > allocation failure so that we can return immediately upon error without
> > having to unwind.
> >
> > WARNING: lock held when returning to user space!
> > 4.20.0+ #174 Not tainted
> > ------------------------------------------------
> > syz-executor556/8153 is leaving the kernel with locks still held!
> > 1 lock held by syz-executor556/8153:
> >   #0: 000000005100c85c (crtc_ww_class_acquire){+.+.}, at:
> > set_property_atomic+0xb3/0x330 drivers/gpu/drm/drm_mode_object.c:462
> >
> > Reported-by: syzbot+6ea337c427f5083ebdf2@syzkaller.appspotmail.com
> > Fixes: 144a7999d633 ("drm: Handle properties in the core for atomic drivers")
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Cc: Sean Paul <sean@poorly.run>
> > Cc: David Airlie <airlied@linux.ie>
> > Cc: <stable@vger.kernel.org> # v4.14+
> > ---
> >  drivers/gpu/drm/drm_mode_object.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c
> > index bb1dd46496cd..a9005c1c2384 100644
> > --- a/drivers/gpu/drm/drm_mode_object.c
> > +++ b/drivers/gpu/drm/drm_mode_object.c
> > @@ -459,12 +459,13 @@ static int set_property_atomic(struct drm_mode_object *obj,
> >       struct drm_modeset_acquire_ctx ctx;
> >       int ret;
> >  
> > -     drm_modeset_acquire_init(&ctx, 0);
> > -
> >       state = drm_atomic_state_alloc(dev);
> >       if (!state)
> >               return -ENOMEM;
> > +
> > +     drm_modeset_acquire_init(&ctx, 0);
> >       state->acquire_ctx = &ctx;
> > +
> >  retry:
> >       if (prop == state->dev->mode_config.dpms_property) {
> >               if (obj->type != DRM_MODE_OBJECT_CONNECTOR) {
> 
> Woops only now see you did the same.. :)

I'm impressed that syszbot managed to hit it! Afaict, it is only a
debugging faux pas with no real user impact, so perhaps the stable is
overkill.
 
> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Ta, pushed to drm-misc-next
-Chris

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm: Reorder set_property_atomic to avoid returning with an active ww_ctx
  2019-01-03 10:16   ` Chris Wilson
@ 2019-01-07 10:30     ` Daniel Vetter
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2019-01-07 10:30 UTC (permalink / raw)
  To: Chris Wilson
  Cc: Maarten Lankhorst, dri-devel, intel-gfx,
	syzbot+6ea337c427f5083ebdf2, Daniel Vetter, Sean Paul,
	David Airlie, stable

On Thu, Jan 03, 2019 at 10:16:54AM +0000, Chris Wilson wrote:
> Quoting Maarten Lankhorst (2019-01-03 09:03:27)
> > Op 30-12-2018 om 13:28 schreef Chris Wilson:
> > > Delay the drm_modeset_acquire_init() until after we check for an
> > > allocation failure so that we can return immediately upon error without
> > > having to unwind.
> > >
> > > WARNING: lock held when returning to user space!
> > > 4.20.0+ #174 Not tainted
> > > ------------------------------------------------
> > > syz-executor556/8153 is leaving the kernel with locks still held!
> > > 1 lock held by syz-executor556/8153:
> > >   #0: 000000005100c85c (crtc_ww_class_acquire){+.+.}, at:
> > > set_property_atomic+0xb3/0x330 drivers/gpu/drm/drm_mode_object.c:462
> > >
> > > Reported-by: syzbot+6ea337c427f5083ebdf2@syzkaller.appspotmail.com
> > > Fixes: 144a7999d633 ("drm: Handle properties in the core for atomic drivers")
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > > Cc: Sean Paul <sean@poorly.run>
> > > Cc: David Airlie <airlied@linux.ie>
> > > Cc: <stable@vger.kernel.org> # v4.14+
> > > ---
> > >  drivers/gpu/drm/drm_mode_object.c | 5 +++--
> > >  1 file changed, 3 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c
> > > index bb1dd46496cd..a9005c1c2384 100644
> > > --- a/drivers/gpu/drm/drm_mode_object.c
> > > +++ b/drivers/gpu/drm/drm_mode_object.c
> > > @@ -459,12 +459,13 @@ static int set_property_atomic(struct drm_mode_object *obj,
> > >       struct drm_modeset_acquire_ctx ctx;
> > >       int ret;
> > >  
> > > -     drm_modeset_acquire_init(&ctx, 0);
> > > -
> > >       state = drm_atomic_state_alloc(dev);
> > >       if (!state)
> > >               return -ENOMEM;
> > > +
> > > +     drm_modeset_acquire_init(&ctx, 0);
> > >       state->acquire_ctx = &ctx;
> > > +
> > >  retry:
> > >       if (prop == state->dev->mode_config.dpms_property) {
> > >               if (obj->type != DRM_MODE_OBJECT_CONNECTOR) {
> > 
> > Woops only now see you did the same.. :)
> 
> I'm impressed that syszbot managed to hit it! Afaict, it is only a
> debugging faux pas with no real user impact, so perhaps the stable is
> overkill.

Yeah, "small allocs can't fail" will make sure this isn't a real world
bug. syzbot uses fault injection stuff to hit these (at least that's what
it did in one of the destilled minimal reproduction cases in some other
very similar report).

> > Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> 
> Ta, pushed to drm-misc-next

So agreed -next makes sense, no fixes (but I'm sure the autoselect will
pick it up anyway, but that one can't be helped).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-01-07 10:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-30 12:28 [PATCH] drm: Reorder set_property_atomic to avoid returning with an active ww_ctx Chris Wilson
2018-12-30 13:11 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-12-30 14:31 ` ✓ Fi.CI.IGT: " Patchwork
2019-01-03  9:03 ` [PATCH] " Maarten Lankhorst
2019-01-03 10:16   ` Chris Wilson
2019-01-07 10:30     ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.