public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] chamelium: Fix analog bridge detection memory leak
@ 2018-11-14 15:29 Paul Kocialkowski
  2018-11-14 16:12 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Paul Kocialkowski @ 2018-11-14 15:29 UTC (permalink / raw)
  To: igt-dev

The connector and EDID blob retrieved when checking for analog bridges
need to be freed before returning from the associated function.

Fixes: f8d6afa67 ("tests/chamelium: Detect analog bridges and handle
EDID accordingly")
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
---
 tests/kms_chamelium.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index e0e3e3f1..55b346a9 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -175,8 +175,10 @@ check_analog_bridge(data_t *data, struct chamelium_port *port)
 	unsigned char *edid;
 	char edid_vendor[3];
 
-	if (chamelium_port_get_type(port) != DRM_MODE_CONNECTOR_VGA)
+	if (chamelium_port_get_type(port) != DRM_MODE_CONNECTOR_VGA) {
+		drmModeFreeConnector(connector);
 		return false;
+	}
 
 	igt_assert(kmstest_get_property(data->drm_fd, connector->connector_id,
 					DRM_MODE_OBJECT_CONNECTOR, "EDID", NULL,
@@ -191,14 +193,14 @@ check_analog_bridge(data_t *data, struct chamelium_port *port)
 			  ((edid[9] & 0xe0) >> 5)) + '@';
 	edid_vendor[2] = (edid[9] & 0x1f) + '@';
 
+	drmModeFreePropertyBlob(edid_blob);
+	drmModeFreeConnector(connector);
+
 	/* Analog bridges provide their own EDID */
 	if (edid_vendor[0] != 'I' || edid_vendor[1] != 'G' ||
 	    edid_vendor[0] != 'T')
 		return true;
 
-	drmModeFreePropertyBlob(edid_blob);
-	drmModeFreeConnector(connector);
-
 	return false;
 }
 
-- 
2.19.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.BAT: success for chamelium: Fix analog bridge detection memory leak
  2018-11-14 15:29 [igt-dev] [PATCH i-g-t] chamelium: Fix analog bridge detection memory leak Paul Kocialkowski
@ 2018-11-14 16:12 ` Patchwork
  2018-11-15  3:04 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2018-11-21  1:44 ` [igt-dev] [PATCH i-g-t] " Lyude Paul
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-11-14 16:12 UTC (permalink / raw)
  To: Paul Kocialkowski; +Cc: igt-dev

== Series Details ==

Series: chamelium: Fix analog bridge detection memory leak
URL   : https://patchwork.freedesktop.org/series/52492/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4714 -> IGTPW_2060 =

== Summary - WARNING ==

  Minor unknown changes coming with IGTPW_2060 need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_2060, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

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

== Possible new issues ==

  Here are the unknown changes that may have been introduced in IGTPW_2060:

  === IGT changes ===

    ==== Warnings ====

    igt@drv_selftest@live_guc:
      fi-skl-iommu:       PASS -> SKIP +1

    igt@kms_flip@basic-flip-vs-modeset:
      fi-kbl-x1275:       SKIP -> PASS +36

    igt@pm_rpm@basic-rte:
      fi-kbl-7567u:       PASS -> SKIP +4

    igt@prime_vgem@basic-fence-flip:
      fi-cfl-s3:          SKIP -> PASS

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_module_reload@basic-reload-inject:
      fi-kbl-7567u:       PASS -> DMESG-WARN (fdo#108529, fdo#105602) +1

    igt@drv_selftest@live_contexts:
      fi-icl-u:           NOTRUN -> INCOMPLETE (fdo#108315)

    igt@drv_selftest@live_hangcheck:
      fi-skl-iommu:       PASS -> INCOMPLETE (fdo#108744, fdo#108602)

    igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
      fi-byt-clapper:     PASS -> FAIL (fdo#103191, fdo#107362)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
      fi-kbl-7567u:       PASS -> DMESG-FAIL (fdo#105079)

    igt@pm_rpm@module-reload:
      fi-kbl-7567u:       PASS -> DMESG-WARN (fdo#108529)

    
    ==== Possible fixes ====

    igt@drv_module_reload@basic-reload:
      fi-blb-e6850:       INCOMPLETE (fdo#107718) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-byt-clapper:     FAIL (fdo#103191, fdo#107362) -> PASS

    
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#105079 https://bugs.freedesktop.org/show_bug.cgi?id=105079
  fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
  fdo#108315 https://bugs.freedesktop.org/show_bug.cgi?id=108315
  fdo#108529 https://bugs.freedesktop.org/show_bug.cgi?id=108529
  fdo#108602 https://bugs.freedesktop.org/show_bug.cgi?id=108602
  fdo#108744 https://bugs.freedesktop.org/show_bug.cgi?id=108744


== Participating hosts (53 -> 46) ==

  Additional (1): fi-icl-u 
  Missing    (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-icl-u2 fi-bsw-cyan fi-snb-2520m fi-ctg-p8600 


== Build changes ==

    * IGT: IGT_4714 -> IGTPW_2060

  CI_DRM_5106: 852b9329fbb6ea8bdbb3dac78328aae73d919305 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2060: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2060/
  IGT_4714: cab148ca3ec904a94d0cd43476cf7e1f8663f906 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2060/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.IGT: success for chamelium: Fix analog bridge detection memory leak
  2018-11-14 15:29 [igt-dev] [PATCH i-g-t] chamelium: Fix analog bridge detection memory leak Paul Kocialkowski
  2018-11-14 16:12 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-11-15  3:04 ` Patchwork
  2018-11-21  1:44 ` [igt-dev] [PATCH i-g-t] " Lyude Paul
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-11-15  3:04 UTC (permalink / raw)
  To: Paul Kocialkowski; +Cc: igt-dev

== Series Details ==

Series: chamelium: Fix analog bridge detection memory leak
URL   : https://patchwork.freedesktop.org/series/52492/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4714_full -> IGTPW_2060_full =

== Summary - WARNING ==

  Minor unknown changes coming with IGTPW_2060_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_2060_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

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

== Possible new issues ==

  Here are the unknown changes that may have been introduced in IGTPW_2060_full:

  === IGT changes ===

    ==== Warnings ====

    igt@pm_rc6_residency@rc6-accuracy:
      shard-kbl:          PASS -> SKIP
      shard-snb:          SKIP -> PASS

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_blt@dumb-buf-max:
      shard-snb:          PASS -> INCOMPLETE (fdo#105411)

    igt@gem_workarounds@suspend-resume-context:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665)

    igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c:
      shard-kbl:          NOTRUN -> DMESG-WARN (fdo#107956) +1

    igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a:
      shard-apl:          PASS -> DMESG-WARN (fdo#107956)

    igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
      shard-glk:          NOTRUN -> DMESG-WARN (fdo#107956) +1

    igt@kms_color@pipe-a-ctm-max:
      shard-apl:          PASS -> FAIL (fdo#108147)

    igt@kms_color@pipe-a-degamma:
      shard-apl:          PASS -> FAIL (fdo#104782, fdo#108145)

    igt@kms_color@pipe-c-legacy-gamma:
      shard-apl:          PASS -> FAIL (fdo#104782)

    igt@kms_cursor_crc@cursor-128x42-onscreen:
      shard-kbl:          PASS -> FAIL (fdo#103232) +1

    igt@kms_cursor_crc@cursor-256x256-onscreen:
      shard-glk:          NOTRUN -> FAIL (fdo#103232)

    igt@kms_cursor_crc@cursor-256x85-sliding:
      shard-kbl:          PASS -> DMESG-WARN (fdo#105602, fdo#103313, fdo#103558) +9

    igt@kms_cursor_crc@cursor-64x21-random:
      shard-apl:          PASS -> FAIL (fdo#103232) +11

    igt@kms_cursor_legacy@cursorb-vs-flipb-toggle:
      shard-glk:          PASS -> DMESG-WARN (fdo#106538, fdo#105763) +2

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
      shard-apl:          PASS -> FAIL (fdo#103167) +4

    igt@kms_frontbuffer_tracking@fbc-1p-rte:
      shard-apl:          PASS -> FAIL (fdo#103167, fdo#105682)

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-move:
      shard-glk:          PASS -> DMESG-FAIL (fdo#106538)

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-blt:
      shard-glk:          NOTRUN -> FAIL (fdo#103167) +2

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu:
      shard-glk:          PASS -> FAIL (fdo#103167) +2

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
      shard-kbl:          PASS -> DMESG-WARN (fdo#105602, fdo#103313, fdo#103558, fdo#105079)

    igt@kms_plane@pixel-format-pipe-a-planes:
      shard-kbl:          PASS -> FAIL (fdo#103166)
      shard-glk:          PASS -> FAIL (fdo#103166)

    igt@kms_plane@plane-position-covered-pipe-a-planes:
      shard-glk:          NOTRUN -> FAIL (fdo#103166) +1

    igt@kms_plane_alpha_blend@pipe-c-alpha-transparant-fb:
      shard-glk:          NOTRUN -> FAIL (fdo#108145) +7

    igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
      shard-apl:          PASS -> FAIL (fdo#103166) +4

    igt@kms_properties@connector-properties-atomic:
      shard-glk:          NOTRUN -> FAIL (fdo#108642)
      shard-hsw:          NOTRUN -> FAIL (fdo#108642)

    igt@prime_busy@after-vebox:
      shard-glk:          NOTRUN -> DMESG-WARN (fdo#106538, fdo#105763)

    
    ==== Possible fixes ====

    igt@drv_suspend@forcewake:
      shard-kbl:          INCOMPLETE (fdo#103665) -> PASS

    igt@drv_suspend@shrink:
      shard-snb:          INCOMPLETE (fdo#106886, fdo#105411) -> PASS

    igt@gem_ppgtt@blt-vs-render-ctx0:
      shard-kbl:          INCOMPLETE (fdo#106023, fdo#103665, fdo#106887) -> PASS

    igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-b:
      shard-kbl:          DMESG-WARN (fdo#107956) -> PASS

    igt@kms_cursor_crc@cursor-128x42-sliding:
      shard-kbl:          FAIL (fdo#103232) -> PASS +3

    igt@kms_cursor_crc@cursor-256x85-random:
      shard-glk:          FAIL (fdo#103232) -> PASS +1

    igt@kms_cursor_crc@cursor-64x21-sliding:
      shard-apl:          FAIL (fdo#103232) -> PASS +3

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-pwrite:
      shard-apl:          FAIL (fdo#103167) -> PASS

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff:
      shard-glk:          FAIL (fdo#103167) -> PASS +3

    igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
      shard-apl:          FAIL (fdo#103166) -> PASS +1

    igt@kms_plane_multiple@atomic-pipe-b-tiling-yf:
      shard-kbl:          FAIL (fdo#103166) -> PASS

    igt@kms_setmode@basic:
      shard-kbl:          FAIL (fdo#99912) -> PASS

    igt@kms_universal_plane@universal-plane-pipe-a-functional:
      shard-glk:          FAIL (fdo#103166) -> PASS +3

    igt@kms_vblank@pipe-a-query-busy:
      shard-snb:          INCOMPLETE (fdo#105411) -> PASS

    igt@perf_pmu@busy-start-vcs0:
      shard-apl:          DMESG-WARN (fdo#105602, fdo#103558) -> PASS

    
    ==== Warnings ====

    igt@kms_plane_alpha_blend@pipe-c-alpha-transparant-fb:
      shard-kbl:          FAIL (fdo#108145) -> DMESG-FAIL (fdo#108145, fdo#105602, fdo#103313, fdo#103558)

    
  fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
  fdo#103313 https://bugs.freedesktop.org/show_bug.cgi?id=103313
  fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#104782 https://bugs.freedesktop.org/show_bug.cgi?id=104782
  fdo#105079 https://bugs.freedesktop.org/show_bug.cgi?id=105079
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
  fdo#105682 https://bugs.freedesktop.org/show_bug.cgi?id=105682
  fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
  fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
  fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
  fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
  fdo#106887 https://bugs.freedesktop.org/show_bug.cgi?id=106887
  fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
  fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
  fdo#108147 https://bugs.freedesktop.org/show_bug.cgi?id=108147
  fdo#108642 https://bugs.freedesktop.org/show_bug.cgi?id=108642
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912


== Participating hosts (6 -> 5) ==

  Missing    (1): shard-skl 


== Build changes ==

    * IGT: IGT_4714 -> IGTPW_2060

  CI_DRM_5106: 852b9329fbb6ea8bdbb3dac78328aae73d919305 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2060: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2060/
  IGT_4714: cab148ca3ec904a94d0cd43476cf7e1f8663f906 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2060/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] chamelium: Fix analog bridge detection memory leak
  2018-11-14 15:29 [igt-dev] [PATCH i-g-t] chamelium: Fix analog bridge detection memory leak Paul Kocialkowski
  2018-11-14 16:12 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2018-11-15  3:04 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2018-11-21  1:44 ` Lyude Paul
  2018-11-30 14:02   ` Paul Kocialkowski
  2018-12-04  0:54   ` Lyude Paul
  2 siblings, 2 replies; 6+ messages in thread
From: Lyude Paul @ 2018-11-21  1:44 UTC (permalink / raw)
  To: Paul Kocialkowski, igt-dev

Reviewed-by: Lyude Paul <lyude@redhat.com>

Do you need me to push this? Or do you have push access for igt nowadays?

On Wed, 2018-11-14 at 16:29 +0100, Paul Kocialkowski wrote:
> The connector and EDID blob retrieved when checking for analog bridges
> need to be freed before returning from the associated function.
> 
> Fixes: f8d6afa67 ("tests/chamelium: Detect analog bridges and handle
> EDID accordingly")
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> ---
>  tests/kms_chamelium.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
> index e0e3e3f1..55b346a9 100644
> --- a/tests/kms_chamelium.c
> +++ b/tests/kms_chamelium.c
> @@ -175,8 +175,10 @@ check_analog_bridge(data_t *data, struct chamelium_port
> *port)
>  	unsigned char *edid;
>  	char edid_vendor[3];
>  
> -	if (chamelium_port_get_type(port) != DRM_MODE_CONNECTOR_VGA)
> +	if (chamelium_port_get_type(port) != DRM_MODE_CONNECTOR_VGA) {
> +		drmModeFreeConnector(connector);
>  		return false;
> +	}
>  
>  	igt_assert(kmstest_get_property(data->drm_fd, connector->connector_id,
>  					DRM_MODE_OBJECT_CONNECTOR, "EDID",
> NULL,
> @@ -191,14 +193,14 @@ check_analog_bridge(data_t *data, struct
> chamelium_port *port)
>  			  ((edid[9] & 0xe0) >> 5)) + '@';
>  	edid_vendor[2] = (edid[9] & 0x1f) + '@';
>  
> +	drmModeFreePropertyBlob(edid_blob);
> +	drmModeFreeConnector(connector);
> +
>  	/* Analog bridges provide their own EDID */
>  	if (edid_vendor[0] != 'I' || edid_vendor[1] != 'G' ||
>  	    edid_vendor[0] != 'T')
>  		return true;
>  
> -	drmModeFreePropertyBlob(edid_blob);
> -	drmModeFreeConnector(connector);
> -
>  	return false;
>  }
>  
-- 
Cheers,
	Lyude Paul

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] chamelium: Fix analog bridge detection memory leak
  2018-11-21  1:44 ` [igt-dev] [PATCH i-g-t] " Lyude Paul
@ 2018-11-30 14:02   ` Paul Kocialkowski
  2018-12-04  0:54   ` Lyude Paul
  1 sibling, 0 replies; 6+ messages in thread
From: Paul Kocialkowski @ 2018-11-30 14:02 UTC (permalink / raw)
  To: Lyude Paul, igt-dev


[-- Attachment #1.1: Type: text/plain, Size: 2171 bytes --]

Hi,

On Tue, 2018-11-20 at 20:44 -0500, Lyude Paul wrote:
> Reviewed-by: Lyude Paul <lyude@redhat.com>
> 
> Do you need me to push this? Or do you have push access for igt nowadays?

Sorry for the delayed answer. I don't have commit access, so feel free
to push this!

Thanks,

Paul

> On Wed, 2018-11-14 at 16:29 +0100, Paul Kocialkowski wrote:
> > The connector and EDID blob retrieved when checking for analog bridges
> > need to be freed before returning from the associated function.
> > 
> > Fixes: f8d6afa67 ("tests/chamelium: Detect analog bridges and handle
> > EDID accordingly")
> > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> > ---
> >  tests/kms_chamelium.c | 10 ++++++----
> >  1 file changed, 6 insertions(+), 4 deletions(-)
> > 
> > diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
> > index e0e3e3f1..55b346a9 100644
> > --- a/tests/kms_chamelium.c
> > +++ b/tests/kms_chamelium.c
> > @@ -175,8 +175,10 @@ check_analog_bridge(data_t *data, struct chamelium_port
> > *port)
> >  	unsigned char *edid;
> >  	char edid_vendor[3];
> >  
> > -	if (chamelium_port_get_type(port) != DRM_MODE_CONNECTOR_VGA)
> > +	if (chamelium_port_get_type(port) != DRM_MODE_CONNECTOR_VGA) {
> > +		drmModeFreeConnector(connector);
> >  		return false;
> > +	}
> >  
> >  	igt_assert(kmstest_get_property(data->drm_fd, connector->connector_id,
> >  					DRM_MODE_OBJECT_CONNECTOR, "EDID",
> > NULL,
> > @@ -191,14 +193,14 @@ check_analog_bridge(data_t *data, struct
> > chamelium_port *port)
> >  			  ((edid[9] & 0xe0) >> 5)) + '@';
> >  	edid_vendor[2] = (edid[9] & 0x1f) + '@';
> >  
> > +	drmModeFreePropertyBlob(edid_blob);
> > +	drmModeFreeConnector(connector);
> > +
> >  	/* Analog bridges provide their own EDID */
> >  	if (edid_vendor[0] != 'I' || edid_vendor[1] != 'G' ||
> >  	    edid_vendor[0] != 'T')
> >  		return true;
> >  
> > -	drmModeFreePropertyBlob(edid_blob);
> > -	drmModeFreeConnector(connector);
> > -
> >  	return false;
> >  }
> >  
-- 
Paul Kocialkowski, Bootlin (formerly Free Electrons)
Embedded Linux and kernel engineering
https://bootlin.com

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] chamelium: Fix analog bridge detection memory leak
  2018-11-21  1:44 ` [igt-dev] [PATCH i-g-t] " Lyude Paul
  2018-11-30 14:02   ` Paul Kocialkowski
@ 2018-12-04  0:54   ` Lyude Paul
  1 sibling, 0 replies; 6+ messages in thread
From: Lyude Paul @ 2018-12-04  0:54 UTC (permalink / raw)
  To: Paul Kocialkowski, igt-dev

Pushed, thanks!

Also, welcome back :)

On Tue, 2018-11-20 at 20:44 -0500, Lyude Paul wrote:
> Reviewed-by: Lyude Paul <lyude@redhat.com>
> 
> Do you need me to push this? Or do you have push access for igt nowadays?
> 
> On Wed, 2018-11-14 at 16:29 +0100, Paul Kocialkowski wrote:
> > The connector and EDID blob retrieved when checking for analog bridges
> > need to be freed before returning from the associated function.
> > 
> > Fixes: f8d6afa67 ("tests/chamelium: Detect analog bridges and handle
> > EDID accordingly")
> > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> > ---
> >  tests/kms_chamelium.c | 10 ++++++----
> >  1 file changed, 6 insertions(+), 4 deletions(-)
> > 
> > diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
> > index e0e3e3f1..55b346a9 100644
> > --- a/tests/kms_chamelium.c
> > +++ b/tests/kms_chamelium.c
> > @@ -175,8 +175,10 @@ check_analog_bridge(data_t *data, struct
> > chamelium_port
> > *port)
> >  	unsigned char *edid;
> >  	char edid_vendor[3];
> >  
> > -	if (chamelium_port_get_type(port) != DRM_MODE_CONNECTOR_VGA)
> > +	if (chamelium_port_get_type(port) != DRM_MODE_CONNECTOR_VGA) {
> > +		drmModeFreeConnector(connector);
> >  		return false;
> > +	}
> >  
> >  	igt_assert(kmstest_get_property(data->drm_fd, connector->connector_id,
> >  					DRM_MODE_OBJECT_CONNECTOR, "EDID",
> > NULL,
> > @@ -191,14 +193,14 @@ check_analog_bridge(data_t *data, struct
> > chamelium_port *port)
> >  			  ((edid[9] & 0xe0) >> 5)) + '@';
> >  	edid_vendor[2] = (edid[9] & 0x1f) + '@';
> >  
> > +	drmModeFreePropertyBlob(edid_blob);
> > +	drmModeFreeConnector(connector);
> > +
> >  	/* Analog bridges provide their own EDID */
> >  	if (edid_vendor[0] != 'I' || edid_vendor[1] != 'G' ||
> >  	    edid_vendor[0] != 'T')
> >  		return true;
> >  
> > -	drmModeFreePropertyBlob(edid_blob);
> > -	drmModeFreeConnector(connector);
> > -
> >  	return false;
> >  }
> >  
-- 
Cheers,
	Lyude Paul

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2018-12-04  0:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-14 15:29 [igt-dev] [PATCH i-g-t] chamelium: Fix analog bridge detection memory leak Paul Kocialkowski
2018-11-14 16:12 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-11-15  3:04 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-11-21  1:44 ` [igt-dev] [PATCH i-g-t] " Lyude Paul
2018-11-30 14:02   ` Paul Kocialkowski
2018-12-04  0:54   ` Lyude Paul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox