From patchwork Mon Oct 12 13:27:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 270328 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52606C43457 for ; Mon, 12 Oct 2020 13:44:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 16B0D222E9 for ; Mon, 12 Oct 2020 13:44:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602510296; bh=hy3wofTbcHYl/O6Wzjta6ryuFIEiG9aOQHF4fXFAF8c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=oGFoOjvm/2oytTcqyG/6qM+kODKI8O4DXFJNXEX4Cqd21tTC2kalCSKAhxoAw0Wti bymHMzmdqGrJhWZPN0DkmEq+enV/95AQ1hNW8lChFM0sDQwSZv2MksUQ4s+dClfMUa DL1YT8aIGbGGXja9+d5FjrB/piweGltgWx9Z8PVY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389503AbgJLNoe (ORCPT ); Mon, 12 Oct 2020 09:44:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:48428 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731421AbgJLNnM (ORCPT ); Mon, 12 Oct 2020 09:43:12 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6B8B121BE5; Mon, 12 Oct 2020 13:43:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602510191; bh=hy3wofTbcHYl/O6Wzjta6ryuFIEiG9aOQHF4fXFAF8c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kzAxl9MZU/dGAD4ZgseFLkDM1eNMnRfbFzInnpgEOXKDiAz6Oje8R0F1M4D0ZfAHU 32tw/1L0J42QgcFi8dCwkjeOpvbQsEuB/NpGzo9WY0hFqqNAdO3020aHQJXTN3D+XG zrEyMgC64TsUqR4VkQ4Hj9u9wV2duvErJL8Mdgf4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Antony Antony , Steffen Klassert , Sasha Levin Subject: [PATCH 5.4 49/85] xfrm: clone XFRMA_SET_MARK in xfrm_do_migrate Date: Mon, 12 Oct 2020 15:27:12 +0200 Message-Id: <20201012132635.225387533@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201012132632.846779148@linuxfoundation.org> References: <20201012132632.846779148@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Antony Antony [ Upstream commit 545e5c571662b1cd79d9588f9d3b6e36985b8007 ] XFRMA_SET_MARK and XFRMA_SET_MARK_MASK was not cloned from the old to the new. Migrate these two attributes during XFRMA_MSG_MIGRATE Fixes: 9b42c1f179a6 ("xfrm: Extend the output_mark to support input direction and masking.") Signed-off-by: Antony Antony Signed-off-by: Steffen Klassert Signed-off-by: Sasha Levin --- 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 f3423562d9336..10d30f0338d72 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -1507,6 +1507,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig, } memcpy(&x->mark, &orig->mark, sizeof(x->mark)); + memcpy(&x->props.smark, &orig->props.smark, sizeof(x->props.smark)); if (xfrm_init_state(x) < 0) goto error;