diff options
author | David Howells <dhowells@redhat.com> | 2018-05-23 11:51:29 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2018-05-23 11:51:29 +0100 |
commit | 1588def91d58bf70afe1acf9fc0331fa26e974f4 (patch) | |
tree | d018c9b539d1c789b4dc8bba4c59226a22433a2d /fs/afs/internal.h | |
parent | c875c76a061df306ca82b69ba80b8da3ee758c87 (diff) | |
download | linux-1588def91d58bf70afe1acf9fc0331fa26e974f4.tar.gz linux-1588def91d58bf70afe1acf9fc0331fa26e974f4.tar.bz2 linux-1588def91d58bf70afe1acf9fc0331fa26e974f4.zip |
afs: Mark afs_net::ws_cell as __rcu and set using rcu functions
The afs_net::ws_cell member is sometimes used under RCU conditions from
within an seq-readlock. It isn't, however, marked __rcu and it isn't set
using the proper RCU barrier-imposing functions.
Fix this by annotating it with __rcu and using appropriate barriers to
make sure accesses are correctly ordered.
Without this, the code can produce the following warning:
>> fs/afs/proc.c:151:24: sparse: incompatible types in comparison expression (different address spaces)
Fixes: f044c8847bb6 ("afs: Lay the groundwork for supporting network namespaces")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/internal.h')
-rw-r--r-- | fs/afs/internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/afs/internal.h b/fs/afs/internal.h index f8086ec95e24..5d922ad148a8 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -231,7 +231,7 @@ struct afs_net { /* Cell database */ struct rb_root cells; - struct afs_cell *ws_cell; + struct afs_cell __rcu *ws_cell; struct work_struct cells_manager; struct timer_list cells_timer; atomic_t cells_outstanding; |