Commit 5e5e8736 authored by Li Wang's avatar Li Wang Committed by Michael S. Tsirkin
Browse files

vhost: reduce stack usage in log_used



Fix the warning: [-Werror=-Wframe-larger-than=]

drivers/vhost/vhost.c: In function log_used:
drivers/vhost/vhost.c:1906:1:
warning: the frame size of 1040 bytes is larger than 1024 bytes

Signed-off-by: default avatarLi Wang <li.wang@windriver.com>
Link: https://lore.kernel.org/r/1600106889-25013-1-git-send-email-li.wang@windriver.com


Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Acked-by: default avatarJason Wang <jasowang@redhat.com>
parent 7ab4de60
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1897,7 +1897,7 @@ static int log_write_hva(struct vhost_virtqueue *vq, u64 hva, u64 len)

static int log_used(struct vhost_virtqueue *vq, u64 used_offset, u64 len)
{
	struct iovec iov[64];
	struct iovec *iov = vq->log_iov;
	int i, ret;

	if (!vq->iotlb)
+1 −0
Original line number Diff line number Diff line
@@ -123,6 +123,7 @@ struct vhost_virtqueue {
	/* Log write descriptors */
	void __user *log_base;
	struct vhost_log *log;
	struct iovec log_iov[64];

	/* Ring endianness. Defaults to legacy native endianness.
	 * Set to true when starting a modern virtio device. */