Re: [PATCH net] can: isotp: isotp_rcv_cf(): fix so->rx race problem

From: Marc Kleine-Budde
Date: Fri Jan 28 2022 - 03:07:24 EST


On 28.01.2022 08:56:19, Oliver Hartkopp wrote:
> I've seen the frame processing sometimes freezes for one second when
> stressing the isotp_rcv() from multiple sources. This finally freezes
> the entire softirq which is either not good and not needed as we only
> need to fix this race for stress tests - and not for real world usage
> that does not create this case.

Hmmm, this doesn't sound good. Can you test with LOCKDEP enabled?

>
> Therefore I created a V2 patch which uses the spin_trylock() to simply drop
> the incomming frame in the race condition.
>
> https://lore.kernel.org/linux-can/20220128074327.52229-1-socketcan@xxxxxxxxxxxx/T/
>
> Please take a look, if it also fixes the issue in your test setup.

regards,
Marc

--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |

Attachment: signature.asc
Description: PGP signature