Skip to content

Commit

Permalink
net: remove dev_valid_name() check from __dev_alloc_name()
Browse files Browse the repository at this point in the history
__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>
  • Loading branch information
Jakub Kicinski committed Oct 24, 2023
1 parent 7ad17b0 commit 70e1b14
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit 70e1b14

Please sign in to comment.