diff --git a/gtp.c b/gtp.c
index 11f8fad..4f5729e 100644
--- a/gtp.c
+++ b/gtp.c
@@ -756,8 +756,12 @@ static int gtp_newlink(struct net *src_net, struct
net_device *dev,
if (!tb[IFLA_MTU])
dev->mtu = real_dev->mtu;
- else if (dev->mtu > real_dev->mtu)
- return -EINVAL;
+ else if (dev->mtu > real_dev->mtu) {
+ netdev_dbg(dev, "GTP mtu greater that transport MTU (%d > %d)\n",
+ dev->mtu, real_dev->mtu);
+ err = -EINVAL;
+ goto out_err;
This is function is using __dev_get_by_index(), so we're not holding a
reference on the netdevice here.
But there is a 'dev_hold(real_dev);' right before that if condition. Doesn't
that
take a reference to the netdevice?