Re: [PATCH v3 1/2] can: netlink: prevent incoherent can configuration in case of early return

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

 





On 14.09.21 13:45, Vincent MAILHOL wrote:

However, one driver fails to check the return value of open_candev():
https://elixir.bootlin.com/linux/v5.11/source/drivers/net/can/softing/softing_fw.c#L636

So, for this particular driver, we can send incoherent values to the device.

The code with all the sanity checks is already pretty complex IMO.

ACK.

I wonder if this effort is worth it.

Well, I was thinking "this is a bug so let's fix it". But your
argument is fair. I also did not like how complex the code was
getting when trying to fix that. I guess that this bug is
acceptable. I will leave it as it is.

Now, I am just worried about the softing driver.

IMO this should not be a problem.

The code is only used for a *restart* of the CAN interface. Therefore the bitrates have been checked at the original (first) start.

Actually, the softing driver is not CAN-FD capable.
So there was probably no real needs to worry.

Yes. I luckily checked the other mails in the inbox before answering that ;-)

Best,
Oliver



[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