On Thu, 2016-09-01 at 22:37 +0200, Johanna Abrahamsson wrote:
> Reduce size of rps_sock_flow_sysctl to improve readability.
> 
> Signed-off-by: Johanna Abrahamsson <joha...@mjao.org>
> ---
>  net/core/sysctl_net_core.c | 44 ++++++++++++++++++++++----------------------
>  1 file changed, 22 insertions(+), 22 deletions(-)
> 
> diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
> index 0df2aa6..d0be2ce 100644
> --- a/net/core/sysctl_net_core.c
> +++ b/net/core/sysctl_net_core.c
> @@ -53,29 +53,29 @@ static int rps_sock_flow_sysctl(struct ctl_table *table, 
> int write,
>       ret = proc_dointvec(&tmp, write, buffer, lenp, ppos);
>  
>       if (write) {
> -             if (size) {
> -                     if (size > 1<<29) {
> -                             /* Enforce limit to prevent overflow */
> -                             mutex_unlock(&sock_flow_mutex);
> -                             return -EINVAL;
> +             if (!size)
> +                     goto exit_unlock;

Hi Johanna

Unfortunately this would break the following action :

lpaa24:~# cat /proc/sys/net/core/rps_sock_flow_entries 
65536
lpaa24:~# echo 0 >/proc/sys/net/core/rps_sock_flow_entries
lpaa24:~# cat /proc/sys/net/core/rps_sock_flow_entries 
0

If you resubmit a V2, please include a 'Tested:' section showing how
you have tested your (first linux ?) patch ;)

Thanks !

Reply via email to