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: <1371283942.23997.8.camel@cr0>
Date:	Sat, 15 Jun 2013 16:12:22 +0800
From:	Cong Wang <amwang@...hat.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	netdev@...r.kernel.org,
	Stephen Hemminger <stephen@...workplumber.org>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [Patch net-next v5 3/3] igmp: convert RTNL lock to a spinlock

On Sat, 2013-06-15 at 00:55 -0700, Eric Dumazet wrote:
> On Sat, 2013-06-15 at 15:41 +0800, Cong Wang wrote:
> > From: Cong Wang <amwang@...hat.com>
> > 
> > It is not necessary to hold RTNL lock to protect mc_list,
> > at least IPv6 mcast is using a local spinlock, IPv4 can do
> > this too. This patch converts RTNL lock+RCU to spinlock+RCU.
> > 
> > Cc: Eric Dumazet <eric.dumazet@...il.com>
> > Cc: Stephen Hemminger <stephen@...workplumber.org>
> > Cc: "David S. Miller" <davem@...emloft.net>
> > Signed-off-by: Cong Wang <amwang@...hat.com>
> > ---
> > v5: no change
> > v4: rebased on the latest net-next.
> > v3: remove useless synchronize_rcu().
> 
> Really I think this patch is not needed and way too risky.
> 
> I already said that you added bugs, and you keep posting same bugs ?
> 
> ip_mc_join_group() seems buggy after your v5 patch ?

I really missed this in your previous reply, sorry.

I assume you mean ip_mc_inc_group(in_dev, addr), yes.

> 
> Let me repeat : fast path already uses RCU.
> 
> The writer parts are slow path, using a mutex is much better than a
> spinlock as a mutex allows the writer to use GFP_KERNEL allocations, and
> eventually be preempted/scheduled.

I _did_ try to replace spinlock with mutex, but apparently mutex_lock()
can't be called with rcu_read_lock() held, which is the case in
ip_mc_drop_socket().

BTW, if you think this is a problem, IPv6 has the same problem, since it
uses rwlock.

Thanks.

--
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