projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ad17b0
)
net: remove dev_valid_name() check from __dev_alloc_name()
author
Jakub Kicinski
<kuba@kernel.org>
Mon, 23 Oct 2023 15:23:45 +0000
(08:23 -0700)
committer
Jakub Kicinski
<kuba@kernel.org>
Tue, 24 Oct 2023 20:02:58 +0000
(13:02 -0700)
__dev_alloc_name() is only called by dev_prep_valid_name(),
which already checks that name is valid.
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link:
https://lore.kernel.org/r/20231023152346.3639749-6-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/dev.c
patch
|
blob
|
history
diff --git
a/net/core/dev.c
b/net/core/dev.c
index d2698b4bbad4f7a7150580a7c994ef71b7812912..0830f29672214eb62d05a4ed322de60cc30e583e 100644
(file)
--- a/
net/core/dev.c
+++ b/
net/core/dev.c
@@
-1077,9
+1077,6
@@
static int __dev_alloc_name(struct net *net, const char *name, char *res)
struct net_device *d;
char buf[IFNAMSIZ];
- if (!dev_valid_name(name))
- return -EINVAL;
-
/* Verify the string as this thing may have come from the user.
* There must be one "%d" and no other "%" characters.
*/