From: Leon Romanovsky Date: Mon, 1 Jan 2018 11:07:17 +0000 (+0200) Subject: RDMA/cma: Mark end of CMA ID messages X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ddc09c522035297b711d821e72bebf24a11fb617;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git RDMA/cma: Mark end of CMA ID messages [ 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 6cae00ecc905..25de7cc9f49f 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -4453,6 +4453,7 @@ static int cma_get_id_stats(struct sk_buff *skb, struct netlink_callback *cb) id_stats->qp_type = id->qp_type; i_id++; + nlmsg_end(skb, nlh); } cb->args[1] = 0;