Re: [RFC] Questionable RCU/BH usage in cgw_create_job().
From: Oliver Hartkopp <socketcan@hartkopp.net>
Date: 2023-12-21 12:49:30
Also in:
linux-can
Hi Sebastian, I've sent a RFC patch to be reviewed here: https://lore.kernel.org/linux-can/20231221123703.8170-1-socketcan@hartkopp.net/T/#u (local) I hope your suggestion to use rcu_replace_pointer() in the implemented way fits the requirements. Best regards, Oliver On 2023-11-30 20:56, Oliver Hartkopp wrote:
Hi Sebastian, On 30.11.23 17:43, Sebastian Andrzej Siewior wrote:quoted
On 2023-10-31 17:52:47 [+0100], To Oliver Hartkopp wrote:quoted
quoted
The point is to replace/ update cf_mod at runtime while following RCU rules so always either new or the old object is observed. Never an intermediate step.Do you want me to take care of it?Yes, sorry. In fact I've searched some time what would fit best without getting a clear picture. As the changes triggered by the netlink update should come into action with the next processed CAN frame I have thought about adding a shadow 'mod' structure which is written instantly. And then a flag could be set, that is switched by the next incoming CAN frame. I just would have a problem with performing some memory allocation for the 'mod' updates which might take some unpredictable time. If you have some cool ideas please let me know. I'm unsure what is the most effective and performant approach for this use case. Many thanks, Oliver