[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1358544316-6024-1-git-send-email-nickolai@csail.mit.edu>
Date: Fri, 18 Jan 2013 16:25:16 -0500
From: Nickolai Zeldovich <nickolai@...il.mit.edu>
To: David Airlie <airlied@...ux.ie>
Cc: Nickolai Zeldovich <nickolai@...il.mit.edu>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: [PATCH] udl: zero out struct fb_deferred_io on allocation
Ensure all fields of the struct fb_deferred_io are zeroed out on init,
otherwise the fbdefio->first_io function pointer can contain garbage,
and fb_deferred_io_mkwrite() will end up jumping to this garbage address.
Signed-off-by: Nickolai Zeldovich <nickolai@...il.mit.edu>
---
drivers/gpu/drm/udl/udl_fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
index d4ab3be..40503ba 100644
--- a/drivers/gpu/drm/udl/udl_fb.c
+++ b/drivers/gpu/drm/udl/udl_fb.c
@@ -301,7 +301,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;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists