RDMA/cma: Mark end of CMA ID messages
authorLeon Romanovsky <leonro@mellanox.com>
Mon, 1 Jan 2018 11:07:17 +0000 (13:07 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 2 Jan 2018 21:12:47 +0000 (14:12 -0700)
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@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/cma.c

index 7d38c2bff5eab84a14cef611c547b4cd3fc598c2..65c55f79444a3a26dc5e7eb6d1ad341d701e00a3 100644 (file)
@@ -4440,6 +4440,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;