]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
af_packet: tone down the Tx-ring unsupported spew.
authorDave Jones <davej@codemonkey.org.uk>
Mon, 4 Apr 2016 19:11:50 +0000 (15:11 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Sep 2019 06:13:36 +0000 (08:13 +0200)
[ Upstream commit 6ae81ced378820c4c6434b1dedba14a7122df310 ]

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.

Signed-off-by: Dave Jones <davej@codemonkey.org.uk>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/packet/af_packet.c

index 5d8988185c5911670c36ba0c7d28f7cf5de1f8f4..0dd9fc3f57e87bc7d51a3d1e34300e6a66d0dd1b 100644 (file)
@@ -4176,7 +4176,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;
        }