2015-07-29 12:38:21

by Alexander Aring

[permalink] [raw]
Subject: btle 6lowpan races

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


2015-07-29 12:51:53

by Jukka Rissanen

[permalink] [raw]
Subject: Re: btle 6lowpan races

Hi Alex,

On ke, 2015-07-29 at 14:38 +0200, Alexander Aring wrote:
> 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.

>
> If you like I can prepare patches for that.

Sure, patches are welcome.

>
> Any thoughts on this?
>
> - Alex
>
> [0] http://lxr.free-electrons.com/source/net/bluetooth/6lowpan.c#L874


Cheers,
Jukka