Re: [PATCH v1 for-4.14-rc] RDMA/core: Correct nlmsg_len after appending attributes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Thanks

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux