]> git.baikalelectronics.ru Git - kernel.git/commit
net: don't call update_pmtu unconditionally
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Thu, 25 Jan 2018 18:03:03 +0000 (19:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Jan 2018 21:27:34 +0000 (16:27 -0500)
commitf9208097b27ed8a07ca2eb27e11706ff0b089f82
treed81f5825fe96dbfc589b19561961814fed78b4fc
parenta5ba8d6bef09c2fbe28d07b98c1428065afd3f18
net: don't call update_pmtu unconditionally

Some dst_ops (e.g. md_dst_ops)) doesn't set this handler. It may result to:
"BUG: unable to handle kernel NULL pointer dereference at           (null)"

Let's add a helper to check if update_pmtu is available before calling it.

Fixes: 483aabf41299 ("geneve: update skb dst pmtu on tx path")
Fixes: 7be0638ed5db ("vxlan: update skb dst pmtu on tx path")
CC: Roman Kapl <code@rkapl.cz>
CC: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/infiniband/ulp/ipoib/ipoib_cm.c
drivers/net/geneve.c
drivers/net/vxlan.c
include/net/dst.h
net/ipv4/ip_tunnel.c
net/ipv4/ip_vti.c
net/ipv6/ip6_tunnel.c
net/ipv6/ip6_vti.c
net/ipv6/sit.c