virtio: console: Prevent userspace from submitting NULL buffers
authorAmit Shah <amit.shah@redhat.com>
Tue, 14 Sep 2010 07:56:16 +0000 (13:26 +0530)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 21 Sep 2010 01:24:01 +0000 (10:54 +0930)
A userspace could submit a buffer with 0 length to be written to the
host.  Prevent such a situation.

This was not needed previously, but recent changes in the way write()
works exposed this condition to trigger a virtqueue event to the host,
causing a NULL buffer to be sent across.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
CC: stable@kernel.org

No differences found