public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org,
	Hannes Frederic Sowa <hannes@stressinduktion.org>
Subject: re: udp_tunnel: Pass UDP socket down through udp_tunnel{, 6}_xmit_skb().
Date: Wed, 8 Apr 2015 21:48:05 +0300	[thread overview]
Message-ID: <20150408184805.GA12952@mwanda> (raw)

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

             reply	other threads:[~2015-04-08 18:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 18:48 Dan Carpenter [this message]
2015-04-08 19:06 ` udp_tunnel: Pass UDP socket down through udp_tunnel{, 6}_xmit_skb() David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150408184805.GA12952@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=davem@davemloft.net \
    --cc=hannes@stressinduktion.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox