Re: [PATCH] fs: Safe rcu access to hlist.

2017-11-20 Thread Paul E. McKenney
On Mon, Nov 20, 2017 at 09:58:02PM +0100, Luc Van Oostenryck wrote: > On Mon, Nov 20, 2017 at 12:42:53PM -0800, Matthew Wilcox wrote: > > > > I disagree. The notion of whether a pointer is protected by RCU or not > > is definitely not transient. > > Sure. But what about the memory it points to?

Re: [PATCH] fs: Safe rcu access to hlist.

2017-11-20 Thread Luc Van Oostenryck
On Mon, Nov 20, 2017 at 12:42:53PM -0800, Matthew Wilcox wrote: > > I disagree. The notion of whether a pointer is protected by RCU or not > is definitely not transient. Sure. But what about the memory it points to? It's just 'normal' kernel memory, there is nowhere something like some 'RCU memo

Re: [PATCH] fs: Safe rcu access to hlist.

2017-11-20 Thread Matthew Wilcox
On Mon, Nov 20, 2017 at 09:01:32PM +0100, Luc Van Oostenryck wrote: > [not knowing much about RCU's needs here but knowing quite a bit > about sparse] > > I think the issue here is mainly about the use of the address space. > For kernel space vs. __user vs. __iomem, address space works quite > we

Re: [PATCH] fs: Safe rcu access to hlist.

2017-11-20 Thread Luc Van Oostenryck
On Mon, Nov 20, 2017 at 01:55:35PM -0500, Tim Hansen wrote: > On Sun, Nov 19, 2017 at 09:28:49PM +, Al Viro wrote: > > On Sun, Nov 19, 2017 at 03:02:10PM -0500, Tim Hansen wrote: > > > Adds hlist_first_rcu and hlist_next_rcu for safe access > > > to the hlist in seq_hlist_next_rcu. > > > > > >

Re: [PATCH] fs: Safe rcu access to hlist.

2017-11-20 Thread Tim Hansen
On Sun, Nov 19, 2017 at 09:28:49PM +, Al Viro wrote: > On Sun, Nov 19, 2017 at 03:02:10PM -0500, Tim Hansen wrote: > > Adds hlist_first_rcu and hlist_next_rcu for safe access > > to the hlist in seq_hlist_next_rcu. > > > > Found on linux-next branch, tag next-20171117 with sparse. > > Frankly

Re: [PATCH] fs: Safe rcu access to hlist.

2017-11-19 Thread Al Viro
On Sun, Nov 19, 2017 at 03:02:10PM -0500, Tim Hansen wrote: > Adds hlist_first_rcu and hlist_next_rcu for safe access > to the hlist in seq_hlist_next_rcu. > > Found on linux-next branch, tag next-20171117 with sparse. Frankly, I'm tempted to take sparse RCU annotations out for good - they are fa

[PATCH] fs: Safe rcu access to hlist.

2017-11-19 Thread Tim Hansen
Adds hlist_first_rcu and hlist_next_rcu for safe access to the hlist in seq_hlist_next_rcu. Found on linux-next branch, tag next-20171117 with sparse. Signed-off-by: Tim Hansen --- fs/seq_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/seq_file.c b/fs/seq_file.