[PATCH rdma-next 8/8] RDMA/cma: Mark end of CMA ID messages

Leon Romanovsky
2017-12-24T13:43:28Z

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 <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
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 e5c9f42a7e4b..209373159dd7 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -4439,6 +4439,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;