diff options
author | Julien Gomes <[email protected]> | 2017-10-25 11:50:50 -0700 |
---|---|---|
committer | David S. Miller <[email protected]> | 2017-10-26 10:10:03 +0900 |
commit | 5c25f65fd1e42685f7ccd80e0621829c105785d9 (patch) | |
tree | 1d8fdcdcfd73a05f73cd37ec1a32ca2e11a23595 /tools/perf/util/trace-event-scripting.c | |
parent | d309ae5c6a00648198d1932e6db483d612c2e260 (diff) |
tun: allow positive return values on dev_get_valid_name() call
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 <[email protected]>
Acked-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions