diff options
author | Sjur Brændeland <sjur.brandeland@stericsson.com> | 2012-10-15 09:57:34 +0200 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-12-18 15:20:39 +1030 |
commit | 0127f6855e643c6b8fd5fbe3b5fa23c9d26cd237 (patch) | |
tree | 3f4d424926d3cceb7f70d62a79d25fc8e85d4fea | |
parent | fe5295374ec9ac56ba3b619c5c1792b3fd66d859 (diff) | |
download | op-kernel-dev-0127f6855e643c6b8fd5fbe3b5fa23c9d26cd237.zip op-kernel-dev-0127f6855e643c6b8fd5fbe3b5fa23c9d26cd237.tar.gz |
virtio_console: Use kmalloc instead of kzalloc
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 <sjur.brandeland@stericsson.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r-- | drivers/char/virtio_console.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 09d193d..eecb1f9 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; |