]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
RDMA/cma: Mark end of CMA ID messages
authorLeon Romanovsky <leonro@mellanox.com>
Mon, 1 Jan 2018 11:07:17 +0000 (13:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Apr 2018 10:31:04 +0000 (12:31 +0200)
[ 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 <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/core/cma.c

index 67aece2f5d8d773d85e9ec24c026199e6614e022..2fb7f2586353e20978a56ead4690f748143dab59 100644 (file)
@@ -4449,6 +4449,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;