Re: netdevice notifier and device private data

2018-06-12 Thread Alexander Aring
Hi, On Sun, Jun 10, 2018 at 10:09:39PM -0400, Michael Richardson wrote: > > Alexander Aring wrote: > >> It totally seems like broken behaviour. Maybe it's not even > >> intentional. Maybe they are just foobar. > > > They simple don't know what they doing... somebody thought

Re: netdevice notifier and device private data

2018-06-10 Thread Michael Richardson
Alexander Aring wrote: >> It totally seems like broken behaviour. Maybe it's not even >> intentional. Maybe they are just foobar. > They simple don't know what they doing... somebody thought 6LoWPAN need > to be 6LoWPAN, but they actually don't use the 6LoWPAN handling inside

Re: netdevice notifier and device private data

2018-06-10 Thread Alexander Aring
Hi, On Sat, Jun 09, 2018 at 03:01:18PM -0400, Michael Richardson wrote: > > Alexander Aring wrote: > > Futhermore user space programs e.g. radvd will do 6lowpan specific > > handling on 6lowpan dev->type, it will not work either on tun > > devices. > > > I know that wpantund

Re: netdevice notifier and device private data

2018-06-09 Thread Michael Richardson
Alexander Aring wrote: > Futhermore user space programs e.g. radvd will do 6lowpan specific > handling on 6lowpan dev->type, it will not work either on tun > devices. > I know that wpantund from NestLabs do this switch, I am very > curious about the reason but I think they

Re: netdevice notifier and device private data

2018-06-09 Thread Alexander Aring
Hi, On Fri, Jun 08, 2018 at 03:37:44PM -0400, Michael Richardson wrote: > > Alexander Aring wrote: > Alex> I already see code outside who changed tun netdevice to the > Alex> ARPHRD_6LOWPAN type and I suppose they running into this > Alex> issue. (Btw: I don't know why somebody

Re: netdevice notifier and device private data

2018-06-08 Thread Michael Richardson
Alexander Aring wrote: Alex> I already see code outside who changed tun netdevice to the Alex> ARPHRD_6LOWPAN type and I suppose they running into this Alex> issue. (Btw: I don't know why somebody wants to changed that Alex> type to ARPHRD_6LOWPAN on tun). so that they can have

Re: netdevice notifier and device private data

2018-06-08 Thread Alexander Aring
Hi Stephen, On Fri, Jun 08, 2018 at 11:14:57AM -0700, Stephen Hemminger wrote: ... > > notifiers are always called with RTNL mutex held > and dev->type should not change unless RTNL is held. thanks for you answer. I am not talking about any race between notifiers vs dev->type change. I am

Re: netdevice notifier and device private data

2018-06-08 Thread Stephen Hemminger
On Fri, 8 Jun 2018 13:34:55 -0400 Alexander Aring wrote: > Hey netdev community, > > I am trying to solve some issue which Eric Dumazet points to me by > commit ca0edb131bdf ("ieee802154: 6lowpan: fix possible NULL deref in > lowpan_device_event()"). > > The issue is that dev->type can be

netdevice notifier and device private data

2018-06-08 Thread Alexander Aring
Hey netdev community, I am trying to solve some issue which Eric Dumazet points to me by commit ca0edb131bdf ("ieee802154: 6lowpan: fix possible NULL deref in lowpan_device_event()"). The issue is that dev->type can be changed during runtime. We don't have any problems with the netdevice