lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <201003301526.35720.rusty@rustcorp.com.au>
Date:	Tue, 30 Mar 2010 15:26:35 +1030
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	netdev@...r.kernel.org
Cc:	"Michael S. Tsirkin" <mst@...hat.com>
Subject: [PATCH] virtio_net: avoid BUG_ON() with large packets when CONFIG_DEBUG_SG=y

AFAICT only weird kvm setups and lguest traverse this code path now.

Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>
---
 drivers/net/virtio_net.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -351,6 +351,9 @@ static int add_recvbuf_big(struct virtne
 	char *p;
 	int i, err, offset;
 
+	/* This is a waste of cycles, but satisfies CONFIG_DEBUG_SG. */
+	sg_init_table(sg, ARRAY_SIZE(sg));
+
 	/* page in sg[MAX_SKB_FRAGS + 1] is list tail */
 	for (i = MAX_SKB_FRAGS + 1; i > 1; --i) {
 		first = get_a_page(vi, gfp);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ