]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
Revert "net: core: maybe return -EEXIST in __dev_alloc_name"
authorJohannes Berg <johannes.berg@intel.com>
Sat, 2 Dec 2017 07:41:55 +0000 (08:41 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Dec 2017 16:29:48 +0000 (11:29 -0500)
This reverts commit d6f295e9def0; some userspace (in the case
we noticed it's wpa_supplicant), is relying on the current
error code to determine that a fixed name interface already
exists.

Reported-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c

index 07ed21d64f92b39da9b683aa432efde6a14afdf0..f47e96b623088ae354947787ef17217cd32ae64e 100644 (file)
@@ -1106,7 +1106,7 @@ static int __dev_alloc_name(struct net *net, const char *name, char *buf)
         * when the name is long and there isn't enough space left
         * for the digits, or if all bits are used.
         */
-       return p ? -ENFILE : -EEXIST;
+       return -ENFILE;
 }
 
 static int dev_alloc_name_ns(struct net *net,