1. 14 2月, 2019 3 次提交
  2. 10 1月, 2019 1 次提交
  3. 20 12月, 2018 12 次提交
  4. 24 10月, 2018 4 次提交
  5. 01 10月, 2018 2 次提交
  6. 01 8月, 2018 1 次提交
  7. 31 7月, 2018 1 次提交
  8. 02 3月, 2017 1 次提交
  9. 09 2月, 2017 2 次提交
  10. 31 1月, 2017 1 次提交
    • N
      SUNRPC: two small improvements to rpcauth shrinker. · 4c3ffd05
      NeilBrown 提交于
      1/ If we find an entry that is too young to be pruned,
        return SHRINK_STOP to ensure we don't get called again.
        This is more correct, and avoids wasting a little CPU time.
        Prior to 3.12, it can prevent drop_slab() from spinning indefinitely.
      
      2/ Return a precise number from rpcauth_cache_shrink_count(), rather than
        rounding down to a multiple of 100 (of whatever sysctl_vfs_cache_pressure is).
        This ensures that when we "echo 3 > /proc/sys/vm/drop_caches", this cache is
        still purged, even if it has fewer than 100 entires.
      
      Neither of these are really important, they just make behaviour
      more predicatable, which can be helpful when debugging related issues.
      Signed-off-by: NNeilBrown <neilb@suse.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      4c3ffd05
  11. 01 10月, 2016 1 次提交
  12. 20 7月, 2016 2 次提交
    • F
      sunrpc: Fix bit count when setting hashtable size to power-of-two · 34ae685c
      Frank Sorenson 提交于
      Author: Frank Sorenson <sorenson@redhat.com>
      Date:   2016-06-27 13:55:48 -0500
      
          sunrpc: Fix bit count when setting hashtable size to power-of-two
      
          The hashtable size is incorrectly calculated as the next higher
          power-of-two when being set to a power-of-two.  fls() returns the
          bit number of the most significant set bit, with the least
          significant bit being numbered '1'.  For a power-of-two, fls()
          will return a bit number which is one higher than the number of bits
          required, leading to a hashtable which is twice the requested size.
      
          In addition, the value of (1 << nbits) will always be at least num,
          so the test will never be true.
      
          Fix the hash table size calculation to correctly set hashtable
          size, and eliminate the unnecessary check.
      Signed-off-by: NFrank Sorenson <sorenson@redhat.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      34ae685c
    • S
      sunrpc: move NO_CRKEY_TIMEOUT to the auth->au_flags · ce52914e
      Scott Mayhew 提交于
      A generic_cred can be used to look up a unx_cred or a gss_cred, so it's
      not really safe to use the the generic_cred->acred->ac_flags to store
      the NO_CRKEY_TIMEOUT flag.  A lookup for a unx_cred triggered while the
      KEY_EXPIRE_SOON flag is already set will cause both NO_CRKEY_TIMEOUT and
      KEY_EXPIRE_SOON to be set in the ac_flags, leaving the user associated
      with the auth_cred to be in a state where they're perpetually doing 4K
      NFS_FILE_SYNC writes.
      
      This can be reproduced as follows:
      
      1. Mount two NFS filesystems, one with sec=krb5 and one with sec=sys.
      They do not need to be the same export, nor do they even need to be from
      the same NFS server.  Also, v3 is fine.
      $ sudo mount -o v3,sec=krb5 server1:/export /mnt/krb5
      $ sudo mount -o v3,sec=sys server2:/export /mnt/sys
      
      2. As the normal user, before accessing the kerberized mount, kinit with
      a short lifetime (but not so short that renewing the ticket would leave
      you within the 4-minute window again by the time the original ticket
      expires), e.g.
      $ kinit -l 10m -r 60m
      
      3. Do some I/O to the kerberized mount and verify that the writes are
      wsize, UNSTABLE:
      $ dd if=/dev/zero of=/mnt/krb5/file bs=1M count=1
      
      4. Wait until you're within 4 minutes of key expiry, then do some more
      I/O to the kerberized mount to ensure that RPC_CRED_KEY_EXPIRE_SOON gets
      set.  Verify that the writes are 4K, FILE_SYNC:
      $ dd if=/dev/zero of=/mnt/krb5/file bs=1M count=1
      
      5. Now do some I/O to the sec=sys mount.  This will cause
      RPC_CRED_NO_CRKEY_TIMEOUT to be set:
      $ dd if=/dev/zero of=/mnt/sys/file bs=1M count=1
      
      6. Writes for that user will now be permanently 4K, FILE_SYNC for that
      user, regardless of which mount is being written to, until you reboot
      the client.  Renewing the kerberos ticket (assuming it hasn't already
      expired) will have no effect.  Grabbing a new kerberos ticket at this
      point will have no effect either.
      
      Move the flag to the auth->au_flags field (which is currently unused)
      and rename it slightly to reflect that it's no longer associated with
      the auth_cred->ac_flags.  Add the rpc_auth to the arg list of
      rpcauth_cred_key_to_expire and check the au_flags there too.  Finally,
      add the inode to the arg list of nfs_ctx_key_to_expire so we can
      determine the rpc_auth to pass to rpcauth_cred_key_to_expire.
      Signed-off-by: NScott Mayhew <smayhew@redhat.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      ce52914e
  13. 18 5月, 2016 1 次提交
  14. 09 5月, 2016 1 次提交
  15. 28 5月, 2015 1 次提交
    • L
      kernel/params: constify struct kernel_param_ops uses · 9c27847d
      Luis R. Rodriguez 提交于
      Most code already uses consts for the struct kernel_param_ops,
      sweep the kernel for the last offending stragglers. Other than
      include/linux/moduleparam.h and kernel/params.c all other changes
      were generated with the following Coccinelle SmPL patch. Merge
      conflicts between trees can be handled with Coccinelle.
      
      In the future git could get Coccinelle merge support to deal with
      patch --> fail --> grammar --> Coccinelle --> new patch conflicts
      automatically for us on patches where the grammar is available and
      the patch is of high confidence. Consider this a feature request.
      
      Test compiled on x86_64 against:
      
      	* allnoconfig
      	* allmodconfig
      	* allyesconfig
      
      @ const_found @
      identifier ops;
      @@
      
      const struct kernel_param_ops ops = {
      };
      
      @ const_not_found depends on !const_found @
      identifier ops;
      @@
      
      -struct kernel_param_ops ops = {
      +const struct kernel_param_ops ops = {
      };
      
      Generated-by: Coccinelle SmPL
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Junio C Hamano <gitster@pobox.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: cocci@systeme.lip6.fr
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      9c27847d
  16. 25 11月, 2014 1 次提交
  17. 04 8月, 2014 3 次提交
  18. 13 7月, 2014 2 次提交