Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1707403
| From | Vitaly Kuznetsov <vkuznets@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RFC net-next] net: Allow name change of IFF_UP interfaces |
| Date | 2017-08-09 17:10 +0200 |
| Message-ID | <ucAMr-D4-33@gated-at.bofh.it> (permalink) |
| References | <ucwIN-5WY-3@gated-at.bofh.it> <ucyrf-733-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
吉藤英明 <hideaki.yoshifuji@miraclelinux.com> writes: > 2017-08-09 19:42 GMT+09:00 Vitaly Kuznetsov <vkuznets@redhat.com>: >> What happens is: __netvsc_vf_setup() does dev_open() for the VF device and >> the consecutive dev_change_name() fails with -EBUSY because of the >> (dev->flags & IFF_UP) check. The history of this code predates git so I >> wasn't able to figure out when and why the check was added, everything >> seems to work fine without it. dev_change_name() has only two call sites, >> both hold rtnl_lock. >> >> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> >> --- >> RFC: I'm probably miossing something obvious and the check can't be just >> dropped. Stephen suggested a different solution to the isuue: >> https://www.spinics.net/lists/netdev/msg448243.html but it has its own >> drawbacks. >> --- >> net/core/dev.c | 2 -- >> 1 file changed, 2 deletions(-) >> >> diff --git a/net/core/dev.c b/net/core/dev.c >> index 1d75499add72..c608e233a78a 100644 >> --- a/net/core/dev.c >> +++ b/net/core/dev.c >> @@ -1186,8 +1186,6 @@ int dev_change_name(struct net_device *dev, const char *newname) >> BUG_ON(!dev_net(dev)); >> >> net = dev_net(dev); >> - if (dev->flags & IFF_UP) >> - return -EBUSY; >> >> write_seqcount_begin(&devnet_rename_seq); > > I think people expect the name won't change while up > and I don't think it is a good idea to allow changing the > name while the interface is up. I understand the 'legacy' concern but at the same time we don't want to have aftificial limitations too. Name change, in particular, doesn't happen 'under the hood' -- someone privileged enough needs to request the change. Can you think of any particular real world scenarios which are broken by the change? -- Vitaly
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH RFC net-next] net: Allow name change of IFF_UP interfaces Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-08-09 12:50 +0200
Re: [PATCH RFC net-next] net: Allow name change of IFF_UP interfaces 吉藤英明 <hideaki.yoshifuji@miraclelinux.com> - 2017-08-09 14:40 +0200
Re: [PATCH RFC net-next] net: Allow name change of IFF_UP interfaces Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-08-09 17:10 +0200
Re: [PATCH RFC net-next] net: Allow name change of IFF_UP interfaces Andrew Lunn <andrew@lunn.ch> - 2017-08-09 18:20 +0200
Re: [PATCH RFC net-next] net: Allow name change of IFF_UP interfaces Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-08-10 10:50 +0200
Re: [PATCH RFC net-next] net: Allow name change of IFF_UP interfaces Andrew Lunn <andrew@lunn.ch> - 2017-08-10 16:20 +0200
csiph-web