mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
udl-kms: fix crash due to uninitialized memory
commit 09a00abe3a 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
86c18c5a4b
commit
c0357c1895
@@ -221,7 +221,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;
|
||||
|
||||
Reference in New Issue
Block a user