Thread (7 messages) flat view 7 messages, 3 authors, 2011-03-15

Re: [RFC v3 3/6] can: make struct proto const

From: Kurt Van Dijck <hidden>
Date: 2011-03-14 17:17:56

Possibly related (same subject, not in this thread)

On Mon, Mar 14, 2011 at 05:42:23PM +0100, Eric Dumazet wrote:
Le lundi 14 mars 2011 à 16:02 +0100, Kurt Van Dijck a écrit :
quoted
I see your point.
The reason I modified this was, as described, checkpatch.pl was complaining.
Anyway, this sequence was protected by a spinlock 'proto_tab_lock'.
I don't think it was a race.

Did I miss something?
As soon as proto_tab[proto] = cp; is done, another thread on another cpu
can read the pointer and follow it.

Hmm, I missed can_create() also uses the spinlock protection, so you're
probably right.

It seems a bit overkill :(
phonet uses RCU for example.
I'll keep that in mind.
Switching CAN protos to RCU is far beyond to goal of this patch :-)

Thanks,
Kurt
_______________________________________________
Socketcan-core mailing list
Socketcan-core@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/socketcan-core
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help