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: <CAAM7YAnE4w4y6YWWxk0QGOX8Y6AZQHHQBuVMoRuSm=GtALAx=Q@mail.gmail.com>
Date:	Thu, 29 Sep 2011 16:16:58 +0800
From:	"Yan, Zheng " <yanzheng@...n.com>
To:	rongqing.li@...driver.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] Ipv6: Delete rcu_read_lock

On Thu, Sep 29, 2011 at 3:46 PM,  <rongqing.li@...driver.com> wrote:
> From: Roy.Li <rongqing.li@...driver.com>
>
> Delete rcu_read_lock, it is redundant.
>
> Signed-off-by: Roy.Li <rongqing.li@...driver.com>
> ---
>  net/ipv6/ndisc.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
> index 9da6e02..dd633ff 100644
> --- a/net/ipv6/ndisc.c
> +++ b/net/ipv6/ndisc.c
> @@ -370,17 +370,14 @@ static int ndisc_constructor(struct neighbour *neigh)
>        struct neigh_parms *parms;
>        int is_multicast = ipv6_addr_is_multicast(addr);
>
> -       rcu_read_lock();
>        in6_dev = in6_dev_get(dev);
>        if (in6_dev == NULL) {
> -               rcu_read_unlock();
>                return -EINVAL;
>        }
>
>        parms = in6_dev->nd_parms;
>        __neigh_parms_put(neigh->parms);
>        neigh->parms = neigh_parms_clone(parms);
> -       rcu_read_unlock();
>
>        neigh->type = is_multicast ? RTN_MULTICAST : RTN_UNICAST;
>        if (!dev->header_ops) {
> --

I think the rcu_read_lock protects in6_dev->nd_parms.

Yan, Zheng
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ