Hello Eric,
On 04.08.23 17:59, Eric Dumazet wrote:
Hi Olivier
I would feel a bit safer with new longterm device references if you
could add an ro->dev_tracker and use netdev_put() netdev_hold() and
friends ;)
Thanks !
Hi Eric,
the netdev_hold() mechanic has been introduced in Linux 6.0.
Would it make sense to take this patch as fix for all the current stable
kernels and move to the dev-tracker as improvement via net-next as usual?
Good question.
My take on this, but others might disagree :
I think it is better to cook a patch for current upstream kernels.
Then we will adapt it when backporting to old ones, it should be
relatively easy.
I implemented both versions with dev tracker and without dev tracker.
It was just the renaming of (net)dev_[hold|put] and having the
dev_tracker element in the raw_sock data structure.
The new patch is here:
https://lore.kernel.org/linux-can/20230815171447.10879-1-socketcan@xxxxxxxxxxxx/T/#u
I would appreciate if you could take a short look at it.
Many thanks,
Oliver