udp_tunnel: Pass UDP socket down through udp_tunnel{, 6}_xmit_skb().
Subsystems (2)
Hello David Miller,
The patch 79b16aadea32: "udp_tunnel: Pass UDP socket down through udp_tunnel{, 6}_xmit_skb()." from Apr 5, 2015, leads to the following static checker warning:
net/ipv4/ip_tunnel.c:785 ip_tunnel_xmit() error: NULL dereference inside function.
net/ipv4/ip_tunnel.c
781 kfree_skb(skb);
782 return;
783 }
784
785 err = iptunnel_xmit(NULL, rt, skb, fl4.saddr, fl4.daddr, protocol,
^^^^
This doesn't work. It will Oops in iptunnel_xmit() when it does sock_net(sk).
786 tos, ttl, df, !net_eq(tunnel->net, dev_net(dev))); 787 iptunnel_xmit_stats(err, &dev->stats, dev->tstats); 788 789 return;
regards,
dan carpenter
David Miller
maintainerAlready fixed.