diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2010-06-24 17:10:25 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2010-07-16 12:18:17 +0300 |
commit | 95c0ec6a97ae82d39a6e13fc01aa76861a4a76d0 (patch) | |
tree | a581adc7aa2fdd2330790adb3e76b93b112c3ef4 /drivers/vhost/net.c | |
parent | 1680e9063ea28099a1efa8ca11cee069cc7a9bc3 (diff) | |
download | linux-95c0ec6a97ae82d39a6e13fc01aa76861a4a76d0.tar.bz2 |
vhost: avoid pr_err on condition guest can trigger
Guest can trigger packet truncation by posting
a very short buffer and disabling buffer merging.
Convert pr_err to pr_debug to avoid log from filling
up when this happens.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost/net.c')
-rw-r--r-- | drivers/vhost/net.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 2764e0fbf29b..2f6185c845e0 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -177,8 +177,8 @@ static void handle_tx(struct vhost_net *net) break; } if (err != len) - pr_err("Truncated TX packet: " - " len %d != %zd\n", err, len); + pr_debug("Truncated TX packet: " + " len %d != %zd\n", err, len); vhost_add_used_and_signal(&net->dev, vq, head, 0); total_len += len; if (unlikely(total_len >= VHOST_NET_WEIGHT)) { @@ -275,8 +275,8 @@ static void handle_rx(struct vhost_net *net) } /* TODO: Should check and handle checksum. */ if (err > len) { - pr_err("Discarded truncated rx packet: " - " len %d > %zd\n", err, len); + pr_debug("Discarded truncated rx packet: " + " len %d > %zd\n", err, len); vhost_discard_vq_desc(vq); continue; } |