Re: [PATCH net] ip[6]: don't register inet[6]dev when dev is down

2017-07-10 Thread Nicolas Dichtel
Le 08/07/2017 à 20:56, Cong Wang a écrit : > On Fri, Jul 7, 2017 at 5:39 AM, Nicolas Dichtel > wrote: [snip] >> - the patch is easy to backport in older kernel. >> > > Easy to backport doesn't mean easy to verify. ;) As David said, this > code is mess, especially for the keep_addr_on_down logic.

Re: [PATCH net] ip[6]: don't register inet[6]dev when dev is down

2017-07-10 Thread Nicolas Dichtel
Le 08/07/2017 à 20:44, Cong Wang a écrit : > On Sat, Jul 8, 2017 at 3:02 AM, David Miller wrote: [snip] >> Can you show exactly why the procfs state isn't cleaned up for >> these devices moving between namespaces? Maybe that is the real >> bug and a better place to fix this. >> > > It is because

Re: [PATCH net] ip[6]: don't register inet[6]dev when dev is down

2017-07-08 Thread Cong Wang
On Fri, Jul 7, 2017 at 5:39 AM, Nicolas Dichtel wrote: > Le 06/07/2017 à 20:16, Cong Wang a écrit : >> On Thu, Jul 6, 2017 at 5:08 AM, Nicolas Dichtel >> wrote: >>> Le 06/07/2017 à 00:43, Cong Wang a écrit : On Wed, Jul 5, 2017 at 8:57 AM, Nicolas Dichtel wrote: > When a device cha

Re: [PATCH net] ip[6]: don't register inet[6]dev when dev is down

2017-07-08 Thread Cong Wang
On Sat, Jul 8, 2017 at 3:02 AM, David Miller wrote: > From: Nicolas Dichtel > Date: Wed, 5 Jul 2017 17:57:25 +0200 > >> From: Hongjun Li >> >> When the netdev event NETDEV_CHANGEMTU is triggered, the inet[6]dev may be >> created even if the corresponding device is down. This may lead to a leak

Re: [PATCH net] ip[6]: don't register inet[6]dev when dev is down

2017-07-08 Thread David Miller
From: Nicolas Dichtel Date: Wed, 5 Jul 2017 17:57:25 +0200 > From: Hongjun Li > > When the netdev event NETDEV_CHANGEMTU is triggered, the inet[6]dev may be > created even if the corresponding device is down. This may lead to a leak > in the procfs when the device is unregistered, and finally

Re: [PATCH net] ip[6]: don't register inet[6]dev when dev is down

2017-07-07 Thread Nicolas Dichtel
Le 06/07/2017 à 20:16, Cong Wang a écrit : > On Thu, Jul 6, 2017 at 5:08 AM, Nicolas Dichtel > wrote: >> Le 06/07/2017 à 00:43, Cong Wang a écrit : >>> On Wed, Jul 5, 2017 at 8:57 AM, Nicolas Dichtel >>> wrote: When a device changes from one netns to another, it's first unregistered, th

Re: [PATCH net] ip[6]: don't register inet[6]dev when dev is down

2017-07-06 Thread Cong Wang
On Thu, Jul 6, 2017 at 5:08 AM, Nicolas Dichtel wrote: > Le 06/07/2017 à 00:43, Cong Wang a écrit : >> On Wed, Jul 5, 2017 at 8:57 AM, Nicolas Dichtel >> wrote: >>> When a device changes from one netns to another, it's first unregistered, >>> then the netns reference is updated and the dev is reg

Re: [PATCH net] ip[6]: don't register inet[6]dev when dev is down

2017-07-06 Thread Nicolas Dichtel
Le 06/07/2017 à 00:43, Cong Wang a écrit : > On Wed, Jul 5, 2017 at 8:57 AM, Nicolas Dichtel > wrote: >> When a device changes from one netns to another, it's first unregistered, >> then the netns reference is updated and the dev is registered in the new >> netns. Thus, when a slave moves to anoth

Re: [PATCH net] ip[6]: don't register inet[6]dev when dev is down

2017-07-05 Thread Cong Wang
On Wed, Jul 5, 2017 at 8:57 AM, Nicolas Dichtel wrote: > When a device changes from one netns to another, it's first unregistered, > then the netns reference is updated and the dev is registered in the new > netns. Thus, when a slave moves to another netns, it is first > unregistered. This trigger

[PATCH net] ip[6]: don't register inet[6]dev when dev is down

2017-07-05 Thread Nicolas Dichtel
From: Hongjun Li When the netdev event NETDEV_CHANGEMTU is triggered, the inet[6]dev may be created even if the corresponding device is down. This may lead to a leak in the procfs when the device is unregistered, and finally trigger a backtrace: [ 114.724500] bond1 (unregistering): Released all