net/netlabel: Add list_next_rcu() in rcu_dereference().
Subsystems (4)
PATCH 1/1 net/netlabel: Add list_next_rcu() in rcu_dereference().
Add list_next_rcu() for fetching next list in rcu_deference safely.
Found with sparse in linux-next tree on tag next-20171116.
--- net/netlabel/netlabel_addrlist.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/netlabel/netlabel_addrlist.h +2 -2
@@ -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;
Signature · 1 line
2.1.4
David Miller
maintainerFrom: Tim Hansen <[email protected]>
Date: Thu, 16 Nov 2017 12:03:34 -0500
Quoted 5 lines
Add
list_next_rcu()for fetching next list inrcu_deferencesafely.Found with sparse in linux-next tree on tag next-20171116.
Signed-off-by Tim Hansen <[email protected]>
Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Paul Moore
maintainerQuoted 10 lines · David Miller
From: Tim Hansen <[email protected]>
Date: Thu, 16 Nov 2017 12:03:34 -0500Quoted 5 lines
Add
list_next_rcu()for fetching next list inrcu_deferencesafely.Found with sparse in linux-next tree on tag next-20171116.
Signed-off-by Tim Hansen <[email protected]>Applied.
Thanks guys.
My apologies I wasn't able to ACK the patch sooner, I was traveling and had spotty network access.
Signature · 6 lines
paul moore www.paul-moore.com -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html