Re: [PATCH] net/netlabel: Add list_next_rcu() in rcu_dereference().

2017-11-18 Thread Paul Moore
On Fri, Nov 17, 2017 at 8:35 PM, David Miller  wrote:
> From: Tim Hansen 
> Date: Thu, 16 Nov 2017 12:03:34 -0500
>
>> Add list_next_rcu() for fetching next list in rcu_deference safely.
>>
>> Found with sparse in linux-next tree on tag next-20171116.
>>
>> Signed-off-by: Tim Hansen 
>
> Applied.

Thanks guys.

My apologies I wasn't able to ACK the patch sooner, I was traveling
and had spotty network access.

-- 
paul moore
www.paul-moore.com


Re: [PATCH] net/netlabel: Add list_next_rcu() in rcu_dereference().

2017-11-17 Thread David Miller
From: Tim Hansen 
Date: Thu, 16 Nov 2017 12:03:34 -0500

> Add list_next_rcu() for fetching next list in rcu_deference safely.
> 
> Found with sparse in linux-next tree on tag next-20171116.
> 
> Signed-off-by: Tim Hansen 

Applied.


[PATCH] net/netlabel: Add list_next_rcu() in rcu_dereference().

2017-11-16 Thread Tim Hansen
Add list_next_rcu() for fetching next list in rcu_deference safely.

Found with sparse in linux-next tree on tag next-20171116.

Signed-off-by: Tim Hansen 
---
 net/netlabel/netlabel_addrlist.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/netlabel/netlabel_addrlist.h b/net/netlabel/netlabel_addrlist.h
index d0f38bc..ac709f0 100644
--- a/net/netlabel/netlabel_addrlist.h
+++ b/net/netlabel/netlabel_addrlist.h
@@ -87,7 +87,7 @@ static inline struct netlbl_af4list 
*__af4list_valid_rcu(struct list_head *s,
struct list_head *i = s;
struct netlbl_af4list *n = __af4list_entry(s);
while (i != h && !n->valid) {
-   i = rcu_dereference(i->next);
+   i = rcu_dereference(list_next_rcu(i));
n = __af4list_entry(i);
}
return n;
@@ -154,7 +154,7 @@ static inline struct netlbl_af6list 
*__af6list_valid_rcu(struct list_head *s,
struct list_head *i = s;
struct netlbl_af6list *n = __af6list_entry(s);
while (i != h && !n->valid) {
-   i = rcu_dereference(i->next);
+   i = rcu_dereference(list_next_rcu(i));
n = __af6list_entry(i);
}
return n;
-- 
2.1.4