From 0127f6855e643c6b8fd5fbe3b5fa23c9d26cd237 Mon Sep 17 00:00:00 2001 From: Sjur Brændeland Date: Mon, 15 Oct 2012 09:57:34 +0200 Subject: virtio_console: Use kmalloc instead of kzalloc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid the more cpu expensive kzalloc when allocating buffers. Originally kzalloc was intended for isolating the guest from the host by not sending random guest data to the host. But device isolation is not yet in place so kzalloc is not really needed. Signed-off-by: Sjur Brændeland Signed-off-by: Rusty Russell --- drivers/char/virtio_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/char/virtio_console.c') diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 09d193dbb23..eecb1f9e2e6 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -349,7 +349,7 @@ static struct port_buffer *alloc_buf(size_t buf_size) buf = kmalloc(sizeof(*buf), GFP_KERNEL); if (!buf) goto fail; - buf->buf = kzalloc(buf_size, GFP_KERNEL); + buf->buf = kmalloc(buf_size, GFP_KERNEL); if (!buf->buf) goto free_buf; buf->len = 0; -- cgit v1.2.3-70-g09d2