l2tp: fix l2tp_eth module loading
authorGuillaume Nault <g.nault@alphalink.fr>
Thu, 28 Sep 2017 13:44:38 +0000 (15:44 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 1 Jan 2018 20:50:54 +0000 (20:50 +0000)
commit1e44d4e0c0ef21599f86e0b7adb2dc6bcd0c35dd
treeb9c9dc72c30556c62062ff5bab265a9e296f24e0
parentd10c7e4c08f6ce862142655aac31ff301860f68f
l2tp: fix l2tp_eth module loading

commit 9f775ead5e570e7e19015b9e4e2f3dd6e71a5935 upstream.

The l2tp_eth module crashes if its netlink callbacks are run when the
pernet data aren't initialised.

We should normally register_pernet_device() before the genl callbacks.
However, the pernet data only maintain a list of l2tpeth interfaces,
and this list is never used. So let's just drop pernet handling
instead.

Fixes: d9e31d17ceba ("l2tp: Add L2TP ethernet pseudowire support")
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/l2tp/l2tp_eth.c