Commit d12a3d60 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky

s390/mm: add __rcu annotations

Add __rcu annotations so sparse correctly warns only if "slot" gets
derefenced without using rcu_dereference(). Right now we get warnings
because of the missing annotation:

arch/s390/mm/gmap.c:135:17: warning: incorrect type in assignment (different address spaces)
arch/s390/mm/gmap.c:135:17:    expected void **slot
arch/s390/mm/gmap.c:135:17:    got void [noderef] <asn:4>**
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent cb4ef3c2
...@@ -125,7 +125,7 @@ static void gmap_radix_tree_free(struct radix_tree_root *root) ...@@ -125,7 +125,7 @@ static void gmap_radix_tree_free(struct radix_tree_root *root)
struct radix_tree_iter iter; struct radix_tree_iter iter;
unsigned long indices[16]; unsigned long indices[16];
unsigned long index; unsigned long index;
void **slot; void __rcu **slot;
int i, nr; int i, nr;
/* A radix tree is freed by deleting all of its entries */ /* A radix tree is freed by deleting all of its entries */
...@@ -150,7 +150,7 @@ static void gmap_rmap_radix_tree_free(struct radix_tree_root *root) ...@@ -150,7 +150,7 @@ static void gmap_rmap_radix_tree_free(struct radix_tree_root *root)
struct radix_tree_iter iter; struct radix_tree_iter iter;
unsigned long indices[16]; unsigned long indices[16];
unsigned long index; unsigned long index;
void **slot; void __rcu **slot;
int i, nr; int i, nr;
/* A radix tree is freed by deleting all of its entries */ /* A radix tree is freed by deleting all of its entries */
...@@ -1011,7 +1011,7 @@ EXPORT_SYMBOL_GPL(gmap_read_table); ...@@ -1011,7 +1011,7 @@ EXPORT_SYMBOL_GPL(gmap_read_table);
static inline void gmap_insert_rmap(struct gmap *sg, unsigned long vmaddr, static inline void gmap_insert_rmap(struct gmap *sg, unsigned long vmaddr,
struct gmap_rmap *rmap) struct gmap_rmap *rmap)
{ {
void **slot; void __rcu **slot;
BUG_ON(!gmap_is_shadow(sg)); BUG_ON(!gmap_is_shadow(sg));
slot = radix_tree_lookup_slot(&sg->host_to_rmap, vmaddr >> PAGE_SHIFT); slot = radix_tree_lookup_slot(&sg->host_to_rmap, vmaddr >> PAGE_SHIFT);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment