提交 029b6d14 编写于 作者: J Johannes Berg 提交者: David S. Miller

Revert "net: core: maybe return -EEXIST in __dev_alloc_name"

This reverts commit d6f295e9; 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: NJouni Malinen <j@w1.fi>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 42d779ff
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册