1. 15 5月, 2017 7 次提交
  2. 11 3月, 2017 1 次提交
    • K
      nfsd: map the ENOKEY to nfserr_perm for avoiding warning · c952cd4e
      Kinglong Mee 提交于
      Now that Ext4 and f2fs filesystems support encrypted directories and
      files, attempts to access those files may return ENOKEY, resulting in
      the following WARNING.
      
      Map ENOKEY to nfserr_perm instead of nfserr_io.
      
      [ 1295.411759] ------------[ cut here ]------------
      [ 1295.411787] WARNING: CPU: 0 PID: 12786 at fs/nfsd/nfsproc.c:796 nfserrno+0x74/0x80 [nfsd]
      [ 1295.411806] nfsd: non-standard errno: -126
      [ 1295.411816] Modules linked in: nfsd nfs_acl auth_rpcgss nfsv4 nfs lockd fscache tun bridge stp llc fuse ip_set nfnetlink vmw_vsock_vmci_transport vsock snd_seq_midi snd_seq_midi_event coretemp crct10dif_pclmul crc32_generic crc32_pclmul snd_ens1371 gameport ghash_clmulni_intel snd_ac97_codec f2fs intel_rapl_perf ac97_bus snd_seq ppdev snd_pcm snd_rawmidi snd_timer vmw_balloon snd_seq_device snd joydev soundcore parport_pc parport nfit acpi_cpufreq tpm_tis vmw_vmci tpm_tis_core tpm shpchp i2c_piix4 grace sunrpc xfs libcrc32c vmwgfx drm_kms_helper ttm drm crc32c_intel e1000 mptspi scsi_transport_spi serio_raw mptscsih mptbase ata_generic pata_acpi fjes [last unloaded: nfs_acl]
      [ 1295.412522] CPU: 0 PID: 12786 Comm: nfsd Tainted: G        W       4.11.0-rc1+ #521
      [ 1295.412959] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/02/2015
      [ 1295.413814] Call Trace:
      [ 1295.414252]  dump_stack+0x63/0x86
      [ 1295.414666]  __warn+0xcb/0xf0
      [ 1295.415087]  warn_slowpath_fmt+0x5f/0x80
      [ 1295.415502]  ? put_filp+0x42/0x50
      [ 1295.415927]  nfserrno+0x74/0x80 [nfsd]
      [ 1295.416339]  nfsd_open+0xd7/0x180 [nfsd]
      [ 1295.416746]  nfs4_get_vfs_file+0x367/0x3c0 [nfsd]
      [ 1295.417182]  ? security_inode_permission+0x41/0x60
      [ 1295.417591]  nfsd4_process_open2+0x9b2/0x1200 [nfsd]
      [ 1295.418007]  nfsd4_open+0x481/0x790 [nfsd]
      [ 1295.418409]  nfsd4_proc_compound+0x395/0x680 [nfsd]
      [ 1295.418812]  nfsd_dispatch+0xb8/0x1f0 [nfsd]
      [ 1295.419233]  svc_process_common+0x4d9/0x830 [sunrpc]
      [ 1295.419631]  svc_process+0xfe/0x1b0 [sunrpc]
      [ 1295.420033]  nfsd+0xe9/0x150 [nfsd]
      [ 1295.420420]  kthread+0x101/0x140
      [ 1295.420802]  ? nfsd_destroy+0x60/0x60 [nfsd]
      [ 1295.421199]  ? kthread_park+0x90/0x90
      [ 1295.421598]  ret_from_fork+0x2c/0x40
      [ 1295.421996] ---[ end trace 0d5a969cd7852e1f ]---
      Signed-off-by: NKinglong Mee <kinglongmee@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      c952cd4e
  3. 01 2月, 2017 2 次提交
  4. 08 10月, 2016 2 次提交
  5. 22 9月, 2016 1 次提交
  6. 05 8月, 2016 2 次提交
    • J
      nfsd: reorganize nfsd_create · b44061d0
      J. Bruce Fields 提交于
      There's some odd logic in nfsd_create() that allows it to be called with
      the parent directory either locked or unlocked.  The only already-locked
      caller is NFSv2's nfsd_proc_create().  It's less confusing to split out
      the unlocked case into a separate function which the NFSv2 code can call
      directly.
      
      Also fix some comments while we're here.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      b44061d0
    • J
      nfsd: remove redundant zero-length check from create · 12391d07
      J. Bruce Fields 提交于
      lookup_one_len already has this check.
      
      The only effect of this patch is to return access instead of perm in the
      0-length-filename case.  I actually prefer nfserr_perm (or _inval?), but
      I doubt anyone cares.
      
      The isdotent check seems redundant too, but I worry that some client
      might actually care about that strange nfserr_exist error.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      12391d07
  7. 29 5月, 2015 1 次提交
  8. 16 4月, 2015 1 次提交
  9. 30 7月, 2014 1 次提交
  10. 10 7月, 2014 1 次提交
    • J
      nfsd: add a nfserrno mapping for -E2BIG to nfserr_fbig · 62814d6a
      Jeff Layton 提交于
      I saw this pop up with some pynfs testing:
      
          [  123.609992] nfsd: non-standard errno: -7
      
      ...and -7 is -E2BIG. I think what happened is that XFS returned -E2BIG
      due to some xattr operations with the ACL10 pynfs TEST (I guess it has
      limited xattr size?).
      
      Add a better mapping for that error since it's possible that we'll need
      it. How about we convert it to NFSERR_FBIG? As Bruce points out, they
      both have "BIG" in the name so it must be good.
      
      Also, turn the printk in this function into a WARN() so that we can get
      a bit more information about situations that don't have proper mappings.
      Signed-off-by: NJeff Layton <jlayton@primarydata.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      62814d6a
  11. 09 7月, 2014 3 次提交
  12. 26 2月, 2013 1 次提交
  13. 31 7月, 2012 1 次提交
  14. 05 1月, 2011 4 次提交
  15. 31 7月, 2010 1 次提交
  16. 30 7月, 2010 1 次提交
  17. 16 12月, 2009 1 次提交
  18. 15 12月, 2009 2 次提交
  19. 14 11月, 2009 1 次提交
  20. 29 9月, 2009 1 次提交
    • J
      nfsd4: fix error return when pseudoroot missing · f39bde24
      J. Bruce Fields 提交于
      We really shouldn't hit this case at all, and forthcoming kernel and
      nfs-utils changes should eliminate this case; if it does happen,
      consider it a bug rather than reporting an error that doesn't really
      make sense for the operation (since there's no reason for a server to be
      accepting v4 traffic yet have no root filehandle).
      
      Also move some exp_pseudoroot code into a helper function while we're
      here.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      f39bde24
  21. 16 6月, 2009 1 次提交
  22. 19 3月, 2009 1 次提交
    • D
      Short write in nfsd becomes a full write to the client · 31dec253
      David Shaw 提交于
      If a filesystem being written to via NFS returns a short write count
      (as opposed to an error) to nfsd, nfsd treats that as a success for
      the entire write, rather than the short count that actually succeeded.
      
      For example, given a 8192 byte write, if the underlying filesystem
      only writes 4096 bytes, nfsd will ack back to the nfs client that all
      8192 bytes were written.  The nfs client does have retry logic for
      short writes, but this is never called as the client is told the
      complete write succeeded.
      
      There are probably other ways it could happen, but in my case it
      happened with a fuse (filesystem in userspace) filesystem which can
      rather easily have a partial write.
      
      Here is a patch to properly return the short write count to the
      client.
      Signed-off-by: NDavid Shaw <dshaw@jabberwocky.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      31dec253
  23. 08 1月, 2009 1 次提交
  24. 30 9月, 2008 1 次提交
    • J
      nfsd: permit unauthenticated stat of export root · 04716e66
      J. Bruce Fields 提交于
      RFC 2623 section 2.3.2 permits the server to bypass gss authentication
      checks for certain operations that a client may perform when mounting.
      In the case of a client that doesn't have some form of credentials
      available to it on boot, this allows it to perform the mount unattended.
      (Presumably real file access won't be needed until a user with
      credentials logs in.)
      
      Being slightly more lenient allows lots of old clients to access
      krb5-only exports, with the only loss being a small amount of
      information leaked about the root directory of the export.
      
      This affects only v2 and v3; v4 still requires authentication for all
      access.
      
      Thanks to Peter Staubach testing against a Solaris client, which
      suggesting addition of v3 getattr, to the list, and to Trond for noting
      that doing so exposes no additional information.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Cc: Peter Staubach <staubach@redhat.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      04716e66
  25. 24 6月, 2008 1 次提交