Skip to contentSkip to conversation

af_packet: tone down the Tx-ring unsupported spew.

PATCH Dave Jones 3 participants 3 messages Apr 4, 2016 – Apr 6, 2016

Subsystems (3)
lore
Share & tools
lore

Dave Jones

author
#0 lore raw

Trinity and other fuzzers can hit this WARN on far too easily, resulting in a tainted kernel that hinders automated fuzzing.

Replace it with a rate-limited printk.

net/packet/af_packet.c +1 -1
index 1ecfa710ca98..f12c17f355d9 100644
@@ -4151,7 +4151,7 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
 
 	/* Opening a Tx-ring is NOT supported in TPACKET_V3 */
 	if (!closing && tx_ring && (po->tp_version > TPACKET_V2)) {
-		WARN(1, "Tx-ring is not supported.\n");
+		net_warn_ratelimited("Tx-ring is not supported.\n");
 		goto out;
 	}