]> git.baikalelectronics.ru Git - kernel.git/commit
[IPSEC]: Temporarily remove locks around copying of non-atomic fields
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 26 Nov 2007 11:07:34 +0000 (19:07 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 26 Nov 2007 11:07:34 +0000 (19:07 +0800)
commitd943de5c0c73a3d2e6f7a8e1c619cc949dcd5313
tree0437efa29587beb5ebb174c402f7954cfde2269a
parent1a7a5784a29ef191640a64d09abe8b983ae67a83
[IPSEC]: Temporarily remove locks around copying of non-atomic fields

The change 5202eec026867096a85f807bf597b646afbb6408

[IPSEC]: Lock state when copying non-atomic fields to user-space

caused a regression.

Ingo Molnar reports that it causes a potential dead-lock found by the
lock validator as it tries to take x->lock within xfrm_state_lock while
numerous other sites take the locks in opposite order.

For 2.6.24, the best fix is to simply remove the added locks as that puts
us back in the same state as we've been in for years.  For later kernels
a proper fix would be to reverse the locking order for every xfrm state
user such that if x->lock is taken together with xfrm_state_lock then
it is to be taken within it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
net/key/af_key.c
net/xfrm/xfrm_user.c