lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAedzxon5Gyp055SfVmpjW96MXjRiHDtTFBv0uarq-nrHfr0gg@mail.gmail.com>
Date:   Mon, 26 Sep 2016 18:13:16 +0900
From:   Erik Kline <ek@...gle.com>
To:     Maciej Żenczykowski <zenczykowski@...il.com>
Cc:     Maciej Żenczykowski <maze@...gle.com>,
        "David S . Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Lorenzo Colitti <lorenzo@...gle.com>
Subject: Re: [PATCH v4 1/7] ipv6 addrconf: enable use of proc_dointvec_minmax
 in addrconf_sysctl

On 25 September 2016 at 20:03, Maciej Żenczykowski
<zenczykowski@...il.com> wrote:
> From: Maciej Żenczykowski <maze@...gle.com>
>
> Signed-off-by: Maciej Żenczykowski <maze@...gle.com>
> ---
>  net/ipv6/addrconf.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> index 2f1f5d439788..11fa1a5564d4 100644
> --- a/net/ipv6/addrconf.c
> +++ b/net/ipv6/addrconf.c
> @@ -6044,8 +6044,14 @@ static int __addrconf_sysctl_register(struct net *net, char *dev_name,
>
>         for (i = 0; table[i].data; i++) {
>                 table[i].data += (char *)p - (char *)&ipv6_devconf;
> -               table[i].extra1 = idev; /* embedded; no ref */
> -               table[i].extra2 = net;
> +               /* If one of these is already set, then it is not safe to
> +                * overwrite either of them: this makes proc_dointvec_minmax
> +                * usable.
> +                */
> +               if (!table[i].extra1 && !table[i].extra2) {
> +                       table[i].extra1 = idev; /* embedded; no ref */
> +                       table[i].extra2 = net;
> +               }
>         }
>
>         snprintf(path, sizeof(path), "net/ipv6/conf/%s", dev_name);
> --
> 2.8.0.rc3.226.g39d4020
>

Acked-by: Erik Kline <ek@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ