]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fixes for 4.4
authorSasha Levin <sashal@kernel.org>
Thu, 12 Sep 2019 22:54:11 +0000 (18:54 -0400)
committerSasha Levin <sashal@kernel.org>
Thu, 12 Sep 2019 22:54:11 +0000 (18:54 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.4/af_packet-tone-down-the-tx-ring-unsupported-spew.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/af_packet-tone-down-the-tx-ring-unsupported-spew.patch b/queue-4.4/af_packet-tone-down-the-tx-ring-unsupported-spew.patch
new file mode 100644 (file)
index 0000000..3a9ad3a
--- /dev/null
@@ -0,0 +1,36 @@
+From 394fb5f87ec8f0428db509d1690a2242bd3f27d3 Mon Sep 17 00:00:00 2001
+From: Dave Jones <davej@codemonkey.org.uk>
+Date: Mon, 4 Apr 2016 15:11:50 -0400
+Subject: af_packet: tone down the Tx-ring unsupported spew.
+
+[ 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 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
+index 5d8988185c591..0dd9fc3f57e87 100644
+--- a/net/packet/af_packet.c
++++ b/net/packet/af_packet.c
+@@ -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;
+       }
+-- 
+2.20.1
+
index b824e8010c773075b0f676ad386cbc0a75cad665..e98fe4bfe741d90dacf98815f3723386727c8e7a 100644 (file)
@@ -5,3 +5,4 @@ vhost-test-fix-build-for-vhost-test.patch
 scripts-decode_stacktrace-match-basepath-using-shell.patch
 clk-s2mps11-add-used-attribute-to-s2mps11_dt_match.patch
 x86-boot-remove-multiple-copy-of-static-function-sanitize_boot_params.patch
+af_packet-tone-down-the-tx-ring-unsupported-spew.patch