[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150926201756.GH3572@htj.duckdns.org>
Date: Sat, 26 Sep 2015 16:17:56 -0400
From: Tejun Heo <tj@...nel.org>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: David Miller <davem@...emloft.net>, cwang@...pensource.com,
tom@...bertland.com, kafai@...com, kernel-team@...com,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
torvalds@...ux-foundation.org, jiri@...nulli.us,
nicolas.dichtel@...nd.com, tgraf@...g.ch, sfeldma@...il.com
Subject: Re: netlink: Add netlink_bound helper and use it in netlink_getname
Hello,
On Sun, Sep 27, 2015 at 04:10:41AM +0800, Herbert Xu wrote:
> Well guess what the bug that you have discovered supposedly due to
> a missing barrier in netlink_connect has nothing to do with the
> barrier. Instead it is caused by a logical error elsewhere that
> would have gone unnoticed otherwise.
It's a combination of two problems. The garbage port number is a
logical error but there still is an ordering problem there between
->bound and ->portid. We need to test ->bind there again because of
the garbage port problem.
> So I retain my position that blindly adding barriers do not make
> bugs go away. Instead you need to have real understanding of what
That's a dishonest summary of what I've been saying.
> the code is doing and every spot where a barrier may be needed must
> be audited manually.
What I've been saying is that we do need to be careful and audit each
barrier usages but at the same time there are established patterns
that we can use to make the process significantly easier and more
reliable.
Thanks.
--
tejun
--
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