Commit df611002 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Kleber Sacilotto de Souza

udl-kms: fix crash due to uninitialized memory

BugLink: https://bugs.launchpad.net/bugs/1792392

commit 09a00abe 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: default avatarMikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 838bbeb1
...@@ -341,7 +341,7 @@ static int udl_fb_open(struct fb_info *info, int user) ...@@ -341,7 +341,7 @@ static int udl_fb_open(struct fb_info *info, int user)
struct fb_deferred_io *fbdefio; 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) { if (fbdefio) {
fbdefio->delay = DL_DEFIO_WRITE_DELAY; fbdefio->delay = DL_DEFIO_WRITE_DELAY;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment