]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hvc_xen: NULL dereference on allocation failure
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 15 May 2012 08:47:47 +0000 (11:47 +0300)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 21 May 2012 21:47:49 +0000 (17:47 -0400)
commit8721f66f644394c2779069e56261be5a6ea09ef9
tree84aa10ca3775f96c4bde4ecc8657cc30090d8801
parentb44a0c17ac209ec33116e78dae82c0c8bd2057f2
hvc_xen: NULL dereference on allocation failure

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.

CC: stable@kernel.org
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/tty/hvc/hvc_xen.c