]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: properly handle invalid states as an error
authorTimo Teräs <timo.teras@iki.fi>
Wed, 22 May 2013 01:40:47 +0000 (01:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 May 2013 08:20:07 +0000 (01:20 -0700)
commit09ffd04c2eb310fd266c7e77a70a6909f524c870
tree1ded621483211872633af219157427bc0cf26e43
parentebb2cda15b7d9ca5a7fc38e6a56a8b5e2feb12b1
xfrm: properly handle invalid states as an error

The error exit path needs err explicitly set. Otherwise it
returns success and the only caller, xfrm_output_resume(),
would oops in skb_dst(skb)->ops derefence as skb_dst(skb) is
NULL.

Bug introduced in commit b1430228 (xfrm: removes a superfluous
check and add a statistic).

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Cc: Li RongQing <roy.qing.li@gmail.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/xfrm/xfrm_output.c