All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] i915: correctly handling failed allocation
@ 2015-12-30 15:59 Insu Yun
  2016-01-04  8:14 ` ✗ warning: Fi.CI.BAT Patchwork
  2016-01-04 14:06   ` Jani Nikula
  0 siblings, 2 replies; 4+ messages in thread
From: Insu Yun @ 2015-12-30 15:59 UTC (permalink / raw)
  To: daniel.vetter, jani.nikula, airlied, intel-gfx, dri-devel, linux-kernel
  Cc: taesoo, yeongjin.jang, insu, changwoo, Insu Yun

Since devm_kzalloc can be failed, it needs to be checked
if not, NULL dereference could be happened.

Signed-off-by: Insu Yun <wuninsu@gmail.com>
---
 drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
index a5e99ac..aa1f7bc 100644
--- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
+++ b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
@@ -666,6 +666,8 @@ struct drm_panel *vbt_panel_init(struct intel_dsi *intel_dsi, u16 panel_id)
 
 	/* This is cheating a bit with the cleanup. */
 	vbt_panel = devm_kzalloc(dev->dev, sizeof(*vbt_panel), GFP_KERNEL);
+	if (!vbt_panel)
+		return NULL;
 
 	vbt_panel->intel_dsi = intel_dsi;
 	drm_panel_init(&vbt_panel->panel);
-- 
1.9.1


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

* ✗ warning: Fi.CI.BAT
  2015-12-30 15:59 [PATCH v2] i915: correctly handling failed allocation Insu Yun
@ 2016-01-04  8:14 ` Patchwork
  2016-01-04 14:06   ` Jani Nikula
  1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2016-01-04  8:14 UTC (permalink / raw)
  To: Insu Yun; +Cc: intel-gfx

== Summary ==

Built on 79686f613b3955a4ed09cee936e7f70ec4e61b67 drm-intel-nightly: 2015y-12m-30d-11h-59m-54s UTC integration manifest

Test gem_storedw_loop:
        Subgroup basic-render:
                dmesg-warn -> PASS       (skl-i5k-2)
Test kms_flip:
        Subgroup basic-flip-vs-dpms:
                dmesg-warn -> PASS       (ilk-hp8440p)
        Subgroup basic-flip-vs-modeset:
                dmesg-warn -> PASS       (hsw-xps12)
                dmesg-warn -> PASS       (bdw-nuci7)
Test kms_pipe_crc_basic:
        Subgroup read-crc-pipe-a:
                dmesg-warn -> PASS       (snb-x220t)
                dmesg-warn -> PASS       (byt-nuc)
        Subgroup read-crc-pipe-b:
                pass       -> DMESG-WARN (snb-dellxps)
        Subgroup suspend-read-crc-pipe-b:
                pass       -> DMESG-WARN (snb-x220t)
Test kms_psr_sink_crc:
        Subgroup psr_basic:
                dmesg-warn -> PASS       (bdw-ultra)
Test kms_setmode:
        Subgroup basic-clone-single-crtc:
                dmesg-warn -> PASS       (snb-dellxps)
Test pm_rpm:
        Subgroup basic-pci-d3-state:
                pass       -> DMESG-WARN (bdw-ultra)

bdw-nuci7        total:132  pass:122  dwarn:1   dfail:0   fail:0   skip:9  
bdw-ultra        total:132  pass:124  dwarn:2   dfail:0   fail:0   skip:6  
bsw-nuc-2        total:135  pass:113  dwarn:2   dfail:0   fail:0   skip:20 
byt-nuc          total:135  pass:120  dwarn:2   dfail:0   fail:0   skip:13 
hsw-brixbox      total:135  pass:126  dwarn:2   dfail:0   fail:0   skip:7  
hsw-gt2          total:135  pass:130  dwarn:1   dfail:0   fail:0   skip:4  
hsw-xps12        total:132  pass:126  dwarn:2   dfail:0   fail:0   skip:4  
ilk-hp8440p      total:135  pass:99   dwarn:1   dfail:0   fail:0   skip:35 
ivb-t430s        total:135  pass:127  dwarn:2   dfail:0   fail:0   skip:6  
skl-i5k-2        total:135  pass:124  dwarn:3   dfail:0   fail:0   skip:8  
skl-i7k-2        total:135  pass:124  dwarn:3   dfail:0   fail:0   skip:8  
snb-dellxps      total:135  pass:121  dwarn:2   dfail:0   fail:0   skip:12 
snb-x220t        total:135  pass:121  dwarn:2   dfail:0   fail:1   skip:11 

Results at /archive/results/CI_IGT_test/Patchwork_1059/

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2] i915: correctly handling failed allocation
  2015-12-30 15:59 [PATCH v2] i915: correctly handling failed allocation Insu Yun
@ 2016-01-04 14:06   ` Jani Nikula
  2016-01-04 14:06   ` Jani Nikula
  1 sibling, 0 replies; 4+ messages in thread
From: Jani Nikula @ 2016-01-04 14:06 UTC (permalink / raw)
  To: Insu Yun, daniel.vetter, airlied, intel-gfx, dri-devel, linux-kernel
  Cc: taesoo, yeongjin.jang, insu, changwoo, Insu Yun

On Wed, 30 Dec 2015, Insu Yun <wuninsu@gmail.com> wrote:
> Since devm_kzalloc can be failed, it needs to be checked
> if not, NULL dereference could be happened.
>
> Signed-off-by: Insu Yun <wuninsu@gmail.com>

Pushed to drm-intel-next-queued, thanks for the patch.

BR,
Jani.

> ---
>  drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
> index a5e99ac..aa1f7bc 100644
> --- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
> +++ b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
> @@ -666,6 +666,8 @@ struct drm_panel *vbt_panel_init(struct intel_dsi *intel_dsi, u16 panel_id)
>  
>  	/* This is cheating a bit with the cleanup. */
>  	vbt_panel = devm_kzalloc(dev->dev, sizeof(*vbt_panel), GFP_KERNEL);
> +	if (!vbt_panel)
> +		return NULL;
>  
>  	vbt_panel->intel_dsi = intel_dsi;
>  	drm_panel_init(&vbt_panel->panel);

-- 
Jani Nikula, Intel Open Source Technology Center

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

* Re: [PATCH v2] i915: correctly handling failed allocation
@ 2016-01-04 14:06   ` Jani Nikula
  0 siblings, 0 replies; 4+ messages in thread
From: Jani Nikula @ 2016-01-04 14:06 UTC (permalink / raw)
  To: daniel.vetter, airlied, intel-gfx, dri-devel, linux-kernel
  Cc: yeongjin.jang, taesoo, insu, Insu Yun, changwoo

On Wed, 30 Dec 2015, Insu Yun <wuninsu@gmail.com> wrote:
> Since devm_kzalloc can be failed, it needs to be checked
> if not, NULL dereference could be happened.
>
> Signed-off-by: Insu Yun <wuninsu@gmail.com>

Pushed to drm-intel-next-queued, thanks for the patch.

BR,
Jani.

> ---
>  drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
> index a5e99ac..aa1f7bc 100644
> --- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
> +++ b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
> @@ -666,6 +666,8 @@ struct drm_panel *vbt_panel_init(struct intel_dsi *intel_dsi, u16 panel_id)
>  
>  	/* This is cheating a bit with the cleanup. */
>  	vbt_panel = devm_kzalloc(dev->dev, sizeof(*vbt_panel), GFP_KERNEL);
> +	if (!vbt_panel)
> +		return NULL;
>  
>  	vbt_panel->intel_dsi = intel_dsi;
>  	drm_panel_init(&vbt_panel->panel);

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2016-01-04 14:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-30 15:59 [PATCH v2] i915: correctly handling failed allocation Insu Yun
2016-01-04  8:14 ` ✗ warning: Fi.CI.BAT Patchwork
2016-01-04 14:06 ` [PATCH v2] i915: correctly handling failed allocation Jani Nikula
2016-01-04 14:06   ` Jani Nikula

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.