Thread (15 messages) 15 messages, 5 authors, 2012-10-23

Re: [PATCH net-next] sockopt: Make SO_BINDTODEVICE readable

flat view

From: Brian Haley <hidden>
Date: 2012-10-23 21:43:28

On 10/22/2012 05:52 PM, Eric Dumazet wrote:
quoted
quoted
I meant another cpu can be changing dev->name[] content while the
strcpy() is done, and you get a mangled devname, like "for" or "bao"
instead of "foo" or "bar"
Even when holding the rcu_read_lock()?  I'd have to hold the rtnl lock there?
Yes, rcu_read_lock() only makes sure the device doesnt disappear.

But its name can be changed.
There's a similar bug in the SIOCGIFNAME/dev_ifname() code too then, but I would
think this rare enough that it doesn't happen in practice.

-Brian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help