Re: [PATCH net v2 1/5] net/ipv6: fix addrconf_sysctl_addr_gen_mode

2018-07-09 Thread David Ahern
On 7/9/18 4:25 AM, Sabrina Dubroca wrote: > addrconf_sysctl_addr_gen_mode() has multiple problems. First, it ignores > the errors returned by proc_dointvec(). > > addrconf_sysctl_addr_gen_mode() calls proc_dointvec() directly, which > writes the value to memory, and then checks if it's valid and

[PATCH net v2 1/5] net/ipv6: fix addrconf_sysctl_addr_gen_mode

2018-07-09 Thread Sabrina Dubroca
addrconf_sysctl_addr_gen_mode() has multiple problems. First, it ignores the errors returned by proc_dointvec(). addrconf_sysctl_addr_gen_mode() calls proc_dointvec() directly, which writes the value to memory, and then checks if it's valid and may return EINVAL. If a bad value is given, the