]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tun_dst: Fix potential NULL dereference
authorTobias Klauser <tklauser@distanz.ch>
Wed, 4 Nov 2015 12:49:49 +0000 (13:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Dec 2015 19:34:09 +0000 (14:34 -0500)
commit46d85c56f04ce31e80b52786c5b739a56f0ef3ae
treee1b12f330e80e2b31a6f9781bf244837f0b79166
parent0c04f7b0d0d109016317fddb16dccdbc7ae2c4fa
tun_dst: Fix potential NULL dereference

[ Upstream commit f63ce5b6fa5e9a0faf7a0e1ef2993a502878c78a ]

In tun_dst_unclone() the return value of skb_metadata_dst() is checked
for being NULL after it is dereferenced. Fix this by moving the
dereference after the NULL check.

Found by the Coverity scanner (CID 1338068).

Fixes: fc4099f17240 ("openvswitch: Fix egress tunnel info.")
Cc: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/dst_metadata.h