xfrm: Fix a race in the xdst pcpu cache.
authorSteffen Klassert <steffen.klassert@secunet.com>
Wed, 10 Jan 2018 11:14:28 +0000 (12:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jan 2018 13:03:41 +0000 (14:03 +0100)
commitceab06885c09f685910779a8685b7659d66de4b5
tree5bf04521c572a53012746989390077c95fd0c902
parent19848ca7b7dad5153860239c893c1eadd603217e
xfrm: Fix a race in the xdst pcpu cache.

commit 76a4201191814a0061cb5c861fafb9ecaa764846 upstream.

We need to run xfrm_resolve_and_create_bundle() with
bottom halves off. Otherwise we may reuse an already
released dst_enty when the xfrm lookup functions are
called from process context.

Fixes: c30d78c14a813db39a647b6a348b428 ("xfrm: add xdst pcpu cache")
Reported-by: Darius Ski <darius.ski@gmail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: David Miller <davem@davemloft.net>,
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/xfrm/xfrm_policy.c