Return-Path: Received: from mail-cys01nam02on0125.outbound.protection.outlook.com ([104.47.37.125]:46720 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S964786AbeCSPy6 (ORCPT ); Mon, 19 Mar 2018 11:54:58 -0400 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Leon Romanovsky , Jason Gunthorpe , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 24/97] RDMA/cma: Mark end of CMA ID messages Date: Mon, 19 Mar 2018 15:54:56 +0000 Message-ID: <20180319155411.12348-24-alexander.levin@microsoft.com> References: <20180319155411.12348-1-alexander.levin@microsoft.com> In-Reply-To: <20180319155411.12348-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Leon Romanovsky [ Upstream commit e48e5e198fb6ec77c91047a694022f0fefa45292 ] The commit 1a1c116f3dcf ("RDMA/netlink: Simplify the put_msg and put_attr") removes nlmsg_len calculation in ibnl_put_attr causing netlink messages and caused to miss source and destination addresses. Fixes: 1a1c116f3dcf ("RDMA/netlink: Simplify the put_msg and put_attr") Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/core/cma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index e457dface2d2..750490be8334 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -4448,6 +4448,7 @@ static int cma_get_id_stats(struct sk_buff *skb, stru= ct netlink_callback *cb) id_stats->qp_type =3D id->qp_type; =20 i_id++; + nlmsg_end(skb, nlh); } =20 cb->args[1] =3D 0; --=20 2.14.1