Re: [srcu] Can we suppress sparse warning?

2016-11-13 Thread Tetsuo Handa
Paul E. McKenney wrote: > On Sat, Nov 12, 2016 at 11:26:15PM +0900, Tetsuo Handa wrote: > > Both head->r.acl and > > _kernel_namespace.policy_list[TOMOYO_ID_MANAGER]->next > > refer normal kernel address space. Thus, I think that this warning is a > > false positive. > > > > This warning goes

Re: [srcu] Can we suppress sparse warning?

2016-11-13 Thread Tetsuo Handa
Paul E. McKenney wrote: > On Sat, Nov 12, 2016 at 11:26:15PM +0900, Tetsuo Handa wrote: > > Both head->r.acl and > > _kernel_namespace.policy_list[TOMOYO_ID_MANAGER]->next > > refer normal kernel address space. Thus, I think that this warning is a > > false positive. > > > > This warning goes

Re: [srcu] Can we suppress sparse warning?

2016-11-12 Thread Paul E. McKenney
On Sat, Nov 12, 2016 at 11:26:15PM +0900, Tetsuo Handa wrote: > Paul E. McKenney wrote: > > Notwithstanding my confusion about what your self-referential > > srcu_dereference() is intended to achieve, what happens if you change the > > "void *ptr = srcu_dereference(ptr, );" to add __rcu? > >

Re: [srcu] Can we suppress sparse warning?

2016-11-12 Thread Paul E. McKenney
On Sat, Nov 12, 2016 at 11:26:15PM +0900, Tetsuo Handa wrote: > Paul E. McKenney wrote: > > Notwithstanding my confusion about what your self-referential > > srcu_dereference() is intended to achieve, what happens if you change the > > "void *ptr = srcu_dereference(ptr, );" to add __rcu? > >

Re: [srcu] Can we suppress sparse warning?

2016-11-12 Thread Tetsuo Handa
Paul E. McKenney wrote: > Notwithstanding my confusion about what your self-referential > srcu_dereference() is intended to achieve, what happens if you change the > "void *ptr = srcu_dereference(ptr, );" to add __rcu? Sorry, I wrote this code for only showing warning message. This

Re: [srcu] Can we suppress sparse warning?

2016-11-12 Thread Tetsuo Handa
Paul E. McKenney wrote: > Notwithstanding my confusion about what your self-referential > srcu_dereference() is intended to achieve, what happens if you change the > "void *ptr = srcu_dereference(ptr, );" to add __rcu? Sorry, I wrote this code for only showing warning message. This

Re: [srcu] Can we suppress sparse warning?

2016-11-09 Thread Paul E. McKenney
On Wed, Nov 09, 2016 at 08:36:31PM +0900, Tetsuo Handa wrote: > Hello. > > When I build > > -- test/test.c -- > #include > > static int __init test_init(void) > { > DEFINE_SRCU(srcu); > int idx = srcu_read_lock(); > void *ptr = srcu_dereference(ptr, );

Re: [srcu] Can we suppress sparse warning?

2016-11-09 Thread Paul E. McKenney
On Wed, Nov 09, 2016 at 08:36:31PM +0900, Tetsuo Handa wrote: > Hello. > > When I build > > -- test/test.c -- > #include > > static int __init test_init(void) > { > DEFINE_SRCU(srcu); > int idx = srcu_read_lock(); > void *ptr = srcu_dereference(ptr, );

[srcu] Can we suppress sparse warning?

2016-11-09 Thread Tetsuo Handa
Hello. When I build -- test/test.c -- #include static int __init test_init(void) { DEFINE_SRCU(srcu); int idx = srcu_read_lock(); void *ptr = srcu_dereference(ptr, ); srcu_read_unlock(, idx); return -EINVAL; } module_init(test_init);

[srcu] Can we suppress sparse warning?

2016-11-09 Thread Tetsuo Handa
Hello. When I build -- test/test.c -- #include static int __init test_init(void) { DEFINE_SRCU(srcu); int idx = srcu_read_lock(); void *ptr = srcu_dereference(ptr, ); srcu_read_unlock(, idx); return -EINVAL; } module_init(test_init);