Skip to contentSkip to conversation

btle 6lowpan races

DISCUSSION Alexander Aring 2 participants 2 messages Jul 29, 2015 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi Jukka,

I think it's bad for filling data for btle lowpan private data at point [0]. This is called after register_netdev and the rtnl_lock isn't hold after calling "register_netdev" anymore which ends in a possible interface up between register and filling lowpan_dev information. The result would be that lowpan_dev is readed somewhere where it isn't filled.

The solution would be simple move the filling between alloc and register of netdev.

If you like I can prepare patches for that.

Any thoughts on this?

- Alex

[0] http://lxr.free-electrons.com/source/net/bluetooth/6lowpan.c#L874

#1 lore raw

Hi Alex,

Quoted 10 lines · Alexander Aring

Hi Jukka,

I think it's bad for filling data for btle lowpan private data at point [0]. This is called after register_netdev and the rtnl_lock isn't hold after calling "register_netdev" anymore which ends in a possible interface up between register and filling lowpan_dev information. The result would be that lowpan_dev is readed somewhere where it isn't filled.

The solution would be simple move the filling between alloc and register of netdev.

Yes, that makes sense.

Quoted 2 lines

If you like I can prepare patches for that.

Sure, patches are welcome.

Quoted 6 lines

Any thoughts on this?

- Alex

[0] http://lxr.free-electrons.com/source/net/bluetooth/6lowpan.c#L874

Cheers,
Jukka