1. 23 5月, 2018 2 次提交
    • D
      afs: Mark afs_net::ws_cell as __rcu and set using rcu functions · 1588def9
      David Howells 提交于
      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: f044c884 ("afs: Lay the groundwork for supporting network namespaces")
      Reported-by: Nkbuild test robot <lkp@intel.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      1588def9
    • D
      afs: Fix a Sparse warning in xdr_decode_AFSFetchStatus() · c875c76a
      David Howells 提交于
      Sparse doesn't appear able to handle the conditionally-taken locks in
      xdr_decode_AFSFetchStatus(), even though the lock and unlock are both
      contingent on the same unvarying function argument.
      
      Deal with this by interpolating a wrapper function that takes the lock if
      needed and calls xdr_decode_AFSFetchStatus() on two separate branches, one
      with the lock held and one without.
      
      This allows Sparse to work out the locking.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      c875c76a
  2. 18 5月, 2018 6 次提交
  3. 16 5月, 2018 32 次提交