Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09a00abe authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Dave Airlie
Browse files

udl-kms: fix crash due to uninitialized memory



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>
parent 542bb978
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -221,7 +221,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;