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: <y2ne2d7436a1004271611h5dc5f184gcbbc6748839c3c58@mail.gmail.com>
Date:	Wed, 28 Apr 2010 01:11:52 +0200
From:	Michał Mirosław <mirqus@...il.com>
To:	Stephen Hemminger <shemminger@...tta.com>
Cc:	Herbert Xu <herbert@...dor.apana.org.au>,
	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] bridge: multicast router list manipulation

2010/4/27 Stephen Hemminger <shemminger@...tta.com>:
> I prefer that the hlist be only accessed through the hlist macro
> objects. Explicit twiddling of links (especially with RCU) exposes
> the code to future bugs.
[...]
> -       port->rlist.pprev = h;
> -       port->rlist.next = p;
> -       rcu_assign_pointer(*h, &port->rlist);
> -       if (p)
> -               p->pprev = &port->rlist.next;
> +       hlist_for_each_entry(p, n, &br->router_list, rlist) {

Shouldn't this be hlist_for_each_entry_rcu?

> +               if ((unsigned long) port >= (unsigned long) p) {
> +                       hlist_add_before_rcu(n, &port->rlist);
> +                       return;
> +               }
> +               last = n;
> +       }
> +
> +       if (last)
> +               hlist_add_after_rcu(last, &port->rlist);
> +       else
> +               hlist_add_head_rcu(&port->rlist, &br->router_list);
>  }
>
[...]

Best Regards,
Michał Mirosław
--
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