diff options
| author | Julien Gomes <julien@arista.com> | 2017-10-25 11:50:50 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-18 11:11:06 +0100 |
| commit | bcb3b90cf3c8369ce0ca48b6e4f67eb57abb1438 (patch) | |
| tree | 877bea728a3f88f1370eaf8be744b0f5fe246117 /net/ipv4/tcp_output.c | |
| parent | 5c8a0850bae234f3f58d166afd75c7e02c95c5c6 (diff) | |
tun: allow positive return values on dev_get_valid_name() call
[ Upstream commit 5c25f65fd1e42685f7ccd80e0621829c105785d9 ]
If the name argument of dev_get_valid_name() contains "%d", it will try
to assign it a unit number in __dev__alloc_name() and return either the
unit number (>= 0) or an error code (< 0).
Considering positive values as error values prevent tun device creations
relying this mechanism, therefor we should only consider negative values
as errors here.
Signed-off-by: Julien Gomes <julien@arista.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv4/tcp_output.c')
0 files changed, 0 insertions, 0 deletions
