RE: sock_create_kern() and network namespace reference counts

2017-02-01 Thread David Laight
From: Cong Wang > Sent: 01 February 2017 17:20 > On Tue, Jan 31, 2017 at 9:57 AM, David Laight wrote: > > From: Cong Wang > >> Sent: 31 January 2017 17:38 > >> On Tue, Jan 31, 2017 at 7:41 AM, David Laight > >> wrote: > >> > Commit 26abe1437 changed sock_create_kern() so that it stopped > >> > h

Re: sock_create_kern() and network namespace reference counts

2017-02-01 Thread Cong Wang
On Tue, Jan 31, 2017 at 9:57 AM, David Laight wrote: > From: Cong Wang >> Sent: 31 January 2017 17:38 >> On Tue, Jan 31, 2017 at 7:41 AM, David Laight >> wrote: >> > Commit 26abe1437 changed sock_create_kern() so that it stopped >> > holding a reference to the network namespace. >> > The rationa

RE: sock_create_kern() and network namespace reference counts

2017-01-31 Thread David Laight
From: Cong Wang > Sent: 31 January 2017 17:38 > On Tue, Jan 31, 2017 at 7:41 AM, David Laight wrote: > > Commit 26abe1437 changed sock_create_kern() so that it stopped > > holding a reference to the network namespace. > > The rational seemed to be 'to allow to stop it' (presumably 'be deleted'). >

Re: sock_create_kern() and network namespace reference counts

2017-01-31 Thread Cong Wang
On Tue, Jan 31, 2017 at 7:41 AM, David Laight wrote: > Commit 26abe1437 changed sock_create_kern() so that it stopped > holding a reference to the network namespace. > The rational seemed to be 'to allow to stop it' (presumably 'be deleted'). > Prior to this change some kernel paths used sk_change

sock_create_kern() and network namespace reference counts

2017-01-31 Thread David Laight
Commit 26abe1437 changed sock_create_kern() so that it stopped holding a reference to the network namespace. The rational seemed to be 'to allow to stop it' (presumably 'be deleted'). Prior to this change some kernel paths used sk_change_net() (etc) to change the namespace after the socket was crea