Re: [PATCH net] tun: allow positive return values on dev_get_valid_name() call

2017-10-25 Thread David Miller
From: Julien Gomes Date: Wed, 25 Oct 2017 11:50:50 -0700 > 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

Re: [PATCH net] tun: allow positive return values on dev_get_valid_name() call

2017-10-25 Thread David Miller
From: Julien Gomes Date: Wed, 25 Oct 2017 11:50:50 -0700 > 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

Re: [PATCH net] tun: allow positive return values on dev_get_valid_name() call

2017-10-25 Thread Cong Wang
On Wed, Oct 25, 2017 at 11:50 AM, Julien Gomes wrote: > 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

[PATCH net] tun: allow positive return values on dev_get_valid_name() call

2017-10-25 Thread Julien Gomes
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