]> git.baikalelectronics.ru Git - kernel.git/commit
[IPSEC]: Do xfrm_state_check_space before encapsulation
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 19 Dec 2007 06:14:25 +0000 (22:14 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:59:13 +0000 (14:59 -0800)
commit5982875ab5c7a48ba996c0abd055b928cf2bcfaa
treeccde31a2c581c1f9ddea0c482f22ce72a9293f0e
parent4f67e256e7bc697084b314a47509b63de6854f60
[IPSEC]: Do xfrm_state_check_space before encapsulation

While merging the IPsec output path I moved the encapsulation output
operation to the top of the loop so that it sits outside of the locked
section.  Unfortunately in doing so it now sits in front of the space
check as well which could be a fatal error.

This patch rearranges the calls so that the space check happens as
the thing on the output path.

This patch also fixes an incorrect goto should the encapsulation output
fail.

Thanks to Kazunori MIYAZAWA for finding this bug.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/xfrm/xfrm_output.c