On Fri, Sep 29, 2017 at 05:41:17PM +0300, Leon Romanovsky wrote: > On Fri, Sep 29, 2017 at 08:25:01AM -0500, Shiraz Saleem wrote: > > Commit 1a1c116f3dcf 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: 1a1c116f3dcf ("RDMA/netlink: Simplify the put_msg and put_attr") > > Signed-off-by: Shiraz Saleem <shiraz.saleem@xxxxxxxxx> > > Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@xxxxxxxxx> > > Except the fact that title is a little bit misleading and better to be > "IB/iwpm: Properly mark end of netlink messages". > > Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> > > And while you are there, can you please fix manual usage of NLMSG_DONE? > > The need to call manually to send_nlmsg_done() indicates wrongly > implemented calculations of netlink size and improper handling of > multi messages. > > In properly handled netlink code, the NLMSG_DONE is sent automatically. > Ok. We ll review the usage of send_nlmsg_done() and send a seperate patch to fix if required. Shiraz -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html