summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2018-06-03 16:40:57 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-05 09:16:23 +0200
commitaa6ba5e2fcc17c7125e4df835ec65d55603b8f95 (patch)
tree7c33d20c736b351e218cc784d39308d1d0ae9295
parent953d8afde43fb6e7ec59e6e0628229e9dff5af1c (diff)
downloadlinux-stable-aa6ba5e2fcc17c7125e4df835ec65d55603b8f95.tar.gz
linux-stable-aa6ba5e2fcc17c7125e4df835ec65d55603b8f95.tar.bz2
linux-stable-aa6ba5e2fcc17c7125e4df835ec65d55603b8f95.zip
udl-kms: fix crash due to uninitialized memory
commit 09a00abe3a9941c2715ca83eb88172cd2f54d8fd upstream. We must use kzalloc when allocating the fb_deferred_io structure. Otherwise, the field first_io is undefined and it causes a crash. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/udl/udl_fb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
index ccb26652198b..06ca0100fb56 100644
--- a/drivers/gpu/drm/udl/udl_fb.c
+++ b/drivers/gpu/drm/udl/udl_fb.c
@@ -341,7 +341,7 @@ static int udl_fb_open(struct fb_info *info, int user)
struct fb_deferred_io *fbdefio;
- fbdefio = kmalloc(sizeof(struct fb_deferred_io), GFP_KERNEL);
+ fbdefio = kzalloc(sizeof(struct fb_deferred_io), GFP_KERNEL);
if (fbdefio) {
fbdefio->delay = DL_DEFIO_WRITE_DELAY;