Re: [PATCH v2] [RFC] can: fix msg_namelen values depending on CAN_REQUIRED_SIZE

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

 



----- Ursprüngliche Mail -----
> Von: "Oliver Hartkopp" <socketcan@xxxxxxxxxxxx>
> An: "linux-can" <linux-can@xxxxxxxxxxxxxxx>
> CC: "Oliver Hartkopp" <socketcan@xxxxxxxxxxxx>, "richard" <richard@xxxxxx>, "Kurt Van Dijck"
> <dev.kurt@xxxxxxxxxxxxxxxxxxxxxx>
> Gesendet: Donnerstag, 25. März 2021 09:13:26
> Betreff: [PATCH v2] [RFC] can: fix msg_namelen values depending on CAN_REQUIRED_SIZE

> Since commit f5223e9eee65 ("can: extend sockaddr_can to include j1939
> members") the sockaddr_can has been extended in size and a new
> CAN_REQUIRED_SIZE macro has been introduced to calculate the protocol
> specific needed size.
> 
> The ABI for the msg_name and msg_namelen has not been adapted to the
> new CAN_REQUIRED_SIZE macro for the other CAN protocols which leads
> to a problem when an existing binary reads the (increased)
> struct sockaddr_can in msg_name.
> 
> Fixes: f5223e9eee65 ("can: extend sockaddr_can to include j1939 members")
> Link:
> https://lore.kernel.org/linux-can/1135648123.112255.1616613706554.JavaMail.zimbra@xxxxxx/T/#t
> Reported-by: Richard Weinberger <richard@xxxxxx>
> Suggested-by: Kurt Van Dijck <dev.kurt@xxxxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Oliver Hartkopp <socketcan@xxxxxxxxxxxx>
> ---
> net/can/bcm.c   | 10 ++++++----
> net/can/isotp.c | 11 +++++++----
> net/can/raw.c   | 14 ++++++++------
> 3 files changed, 21 insertions(+), 14 deletions(-)

The patch unbreaks my application. :-)

Tested-by: Richard Weinberger <richard@xxxxxx>

Thanks,
//richard



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux