]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/iwpm: Properly mark end of NL messages
authorShiraz Saleem <shiraz.saleem@intel.com>
Fri, 29 Sep 2017 13:25:01 +0000 (08:25 -0500)
committerDoug Ledford <dledford@redhat.com>
Fri, 29 Sep 2017 15:32:42 +0000 (11:32 -0400)
commit40d652667991044b020ffbe2cc9b66642b4d2481
treea75a0e283ff1c8e0dbbf3c2eb566cde366a59874
parent805df1fe71085c22195db60a6dc709157429b0a0
RDMA/iwpm: Properly mark end of NL messages

Commit 46ee73ee249b removes nlmsg_len calculation in
ibnl_put_attr causing netlink messages to be rejected due
to incorrect length.

Add nlmsg_end after all attributes are appended to calculate
the nlmsg_len.

Fixes: 46ee73ee249b ("RDMA/netlink: Simplify the put_msg and put_attr")
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/iwpm_msg.c
drivers/infiniband/core/iwpm_util.c