[PATCH] flow_dissect: call init_default_flow_dissectors() earlier

Luis Henriques luis.henriques at canonical.com
Mon Nov 28 11:14:35 UTC 2016

From: Eric Dumazet <edumazet at google.com>

BugLink: https://bugs.launchpad.net/bugs/1645278

Andre Noll reported panics after my recent fix (commit 34fad54c2537
"net: __skb_flow_dissect() must cap its return value")

After some more headaches, Alexander root caused the problem to
init_default_flow_dissectors() being called too late, in case
a network driver like IGB is not a module and receives DHCP message
very early.

Fix is to call init_default_flow_dissectors() much earlier,
as it is a core infrastructure and does not depend on another
kernel service.

Fixes: 06635a35d13d4 ("flow_dissect: use programable dissector in skb_flow_dissect and friends")
Signed-off-by: Eric Dumazet <edumazet at google.com>
Reported-by: Andre Noll <maan at tuebingen.mpg.de>
Diagnosed-by: Alexander Duyck <alexander.h.duyck at intel.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
(cherry picked from commit c9b8af1330198ae241cd545e1f040019010d44d9)
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
 net/core/flow_dissector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 9aba9e93c0a2..ee9082792530 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -949,4 +949,4 @@ static int __init init_default_flow_dissectors(void)
 	return 0;

More information about the kernel-team mailing list