From: Steffen Klassert Subject: [PATCH 5/8] xfrm: fix xfrm_do_migrate() with AEAD e.g(AES-GCM) Date: Fri, 22 Dec 2017 10:44:58 +0100 Message-ID: <20171222094501.23345-6-steffen.klassert@secunet.com> References: <20171222094501.23345-1-steffen.klassert@secunet.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Herbert Xu , Steffen Klassert , To: David Miller Return-path: Received: from a.mx.secunet.com ([62.96.220.36]:43780 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756466AbdLVJpQ (ORCPT ); Fri, 22 Dec 2017 04:45:16 -0500 In-Reply-To: <20171222094501.23345-1-steffen.klassert@secunet.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Antony Antony copy geniv when cloning the xfrm state. x->geniv was not copied to the new state and migration would fail. xfrm_do_migrate .. xfrm_state_clone() .. .. esp_init_aead() crypto_alloc_aead() crypto_alloc_tfm() crypto_find_alg() return EAGAIN and failed Signed-off-by: Antony Antony Signed-off-by: Steffen Klassert --- net/xfrm/xfrm_state.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 1f5cee2269af..88d0a563e141 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -1344,6 +1344,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig, if (orig->aead) { x->aead = xfrm_algo_aead_clone(orig->aead); + x->geniv = orig->geniv; if (!x->aead) goto error; } -- 2.14.1