This is a note to let you know that I've just added the patch titled
hvc_xen: NULL dereference on allocation failure
to the 3.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
hvc_xen-null-dereference-on-allocation-failure.patch
and it can be found in the queue-3.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 201a52bea928687b7557728b176ac4f8a37d5cbd Mon Sep 17 00:00:00 2001
From: Dan Carpenter <[email protected]>
Date: Tue, 15 May 2012 11:47:47 +0300
Subject: hvc_xen: NULL dereference on allocation failure
From: Dan Carpenter <[email protected]>
commit 201a52bea928687b7557728b176ac4f8a37d5cbd upstream.
If kzalloc() returns a NULL here, we pass a NULL to
xencons_disconnect_backend() which will cause an Oops.
Also I removed the __GFP_ZERO while I was at it since kzalloc() implies
__GFP_ZERO.
Acked-by: Stefano Stabellini <[email protected]>
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/tty/hvc/hvc_xen.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/tty/hvc/hvc_xen.c
+++ b/drivers/tty/hvc/hvc_xen.c
@@ -430,9 +430,9 @@ static int __devinit xencons_probe(struc
if (devid == 0)
return -ENODEV;
- info = kzalloc(sizeof(struct xencons_info), GFP_KERNEL | __GFP_ZERO);
+ info = kzalloc(sizeof(struct xencons_info), GFP_KERNEL);
if (!info)
- goto error_nomem;
+ return -ENOMEM;
dev_set_drvdata(&dev->dev, info);
info->xbdev = dev;
info->vtermno = xenbus_devid_to_vtermno(devid);
Patches currently in stable-queue which might be from [email protected]
are
queue-3.4/hvc_xen-null-dereference-on-allocation-failure.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html