Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/sys/external/bsd/drm2/dist/drm Pull up following revision...



details:   https://anonhg.NetBSD.org/src/rev/0082805f114c
branches:  netbsd-9
changeset: 963228:0082805f114c
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Nov 10 13:12:57 2019 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #408):

        sys/external/bsd/drm2/dist/drm/drm_fb_helper.c: revision 1.13

Avoid null pointer dereference found by kUBSan with "member access within
null pointer of type 'struct drm_fb_helper_crtc'".

diffstat:

 sys/external/bsd/drm2/dist/drm/drm_fb_helper.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r e4836a0d7c71 -r 0082805f114c sys/external/bsd/drm2/dist/drm/drm_fb_helper.c
--- a/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c    Sun Nov 10 13:06:46 2019 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c    Sun Nov 10 13:12:57 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_fb_helper.c,v 1.12 2018/08/27 13:37:21 riastradh Exp $     */
+/*     $NetBSD: drm_fb_helper.c,v 1.12.4.1 2019/11/10 13:12:57 martin Exp $    */
 
 /*
  * Copyright (c) 2006-2009 Red Hat Inc.
@@ -30,7 +30,7 @@
  *      Jesse Barnes <jesse.barnes%intel.com@localhost>
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_fb_helper.c,v 1.12 2018/08/27 13:37:21 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_fb_helper.c,v 1.12.4.1 2019/11/10 13:12:57 martin Exp $");
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
@@ -2086,9 +2086,9 @@
                struct drm_display_mode *mode = modes[i];
                struct drm_fb_helper_crtc *fb_crtc = crtcs[i];
                struct drm_fb_offset *offset = &offsets[i];
-               modeset = &fb_crtc->mode_set;
 
                if (mode && fb_crtc) {
+                       modeset = &fb_crtc->mode_set;
                        DRM_DEBUG_KMS("desired mode %s set on crtc %d (%d,%d)\n",
                                      mode->name, fb_crtc->mode_set.crtc->base.id, offset->x, offset->y);
                        fb_crtc->desired_mode = mode;



Home | Main Index | Thread Index | Old Index