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