1. 03 Nov, 2015 4 commits
  2. 02 Nov, 2015 20 commits
  3. 21 Oct, 2015 14 commits
    • Trond Myklebust's avatar
      Merge branch 'bugfixes' · a85240d2
      Trond Myklebust authored
      * bugfixes:
        NFSv4.1/pnfs: Retry through MDS when getting bad length of data
        nfs/blocklayout: Fix bad using of page offset in bl_read_pagelist
        NFS: Return directly if encode_sessionid fail
        NFS: Fix bad checking of max taglen in callback request
        NFS: Fix bad defines of callback response maxsize
        NFS: Use NFS4_MAX_SESSIONID_LEN directly for decode/encode sessionid
        NFS: Remove unneeded NFS_DEBUG checking before define NFSDBG_FACILITY
        NFS: Remove the left function defines in callback.h
        NFS: Remove the left global variable nfs_callback_tcpport
        NFS: Get rid of the unneeded addr stored in callback arguments
        nfsroot: make nfsroot to accept the 1024 bytes long directory name
      a85240d2
    • Kinglong Mee's avatar
      NFSv4.1/pnfs: Retry through MDS when getting bad length of data · f8417b48
      Kinglong Mee authored
      If non rpc-based layout driver return bad length of data, nfs retries
      by calling rpc_restart_call_prepare() that cause an NULL reference panic.
      
      This patch lets nfs retry through MDS for non rpc-based layout driver
      return bad length of data.
      
      [13034.883329] BUG: unable to handle kernel NULL pointer dereference at           (null)
      [13034.884902] IP: [<ffffffffa00db372>] rpc_restart_call_prepare+0x62/0x90 [sunrpc]
      [13034.886558] PGD 0
      [13034.888126] Oops: 0000 [#1] KASAN
      [13034.889710] Modules linked in: blocklayoutdriver(OE) nfsv4(OE) nfs(OE) fscache(E) nfsd(OE) xfs libcrc32c coretemp btrfs crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel ppdev vmw_balloon auth_rpcgss shpchp nfs_acl lockd vmw_vmci parport_pc xor raid6_pq grace parport sunrpc i2c_piix4 vmwgfx drm_kms_helper ttm drm mptspi e1000 serio_raw scsi_transport_spi mptscsih mptbase ata_generic pata_acpi [last unloaded: fscache]
      [13034.898260] CPU: 0 PID: 10112 Comm: kworker/0:1 Tainted: G           OE   4.3.0-rc5+ #279
      [13034.899932] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/02/2015
      [13034.903342] Workqueue: events bl_read_cleanup [blocklayoutdriver]
      [13034.905059] task: ffff88006a9148c0 ti: ffff880035e90000 task.ti: ffff880035e90000
      [13034.906827] RIP: 0010:[<ffffffffa00db372>]  [<ffffffffa00db372>] rpc_restart_call_prepare+0x62/0x90 [sunrpc]
      [13034.910522] RSP: 0018:ffff880035e97b58  EFLAGS: 00010282
      [13034.912378] RAX: fffffbfff04a5a94 RBX: ffff880068fe4858 RCX: 0000000000000003
      [13034.914339] RDX: dffffc0000000000 RSI: 0000000000000003 RDI: 0000000000000282
      [13034.916236] RBP: ffff880035e97b68 R08: 0000000000000001 R09: 0000000000000001
      [13034.918229] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
      [13034.920007] R13: ffff880068fe4858 R14: ffff880068fe4a60 R15: 0000000000001000
      [13034.921845] FS:  0000000000000000(0000) GS:ffffffff82247000(0000) knlGS:0000000000000000
      [13034.923645] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [13034.925525] CR2: 0000000000000000 CR3: 00000000063dd000 CR4: 00000000001406f0
      [13034.932808] Stack:
      [13034.934813]  ffff880068fe4780 0000000000001000 ffff880035e97ba8 ffffffffa08800d2
      [13034.936675]  ffffffffa088029d ffff880068fe4780 ffff880068fe4858 ffffffffa089c0a0
      [13034.938593]  ffff880068fe47e0 ffff88005d59faf0 ffff880035e97be0 ffffffffa087e08f
      [13034.940454] Call Trace:
      [13034.942388]  [<ffffffffa08800d2>] nfs_readpage_result+0x112/0x200 [nfs]
      [13034.944317]  [<ffffffffa088029d>] ? nfs_readpage_done+0xdd/0x160 [nfs]
      [13034.946267]  [<ffffffffa087e08f>] nfs_pgio_result+0x9f/0x120 [nfs]
      [13034.948166]  [<ffffffffa09266cc>] pnfs_ld_read_done+0x7c/0x1e0 [nfsv4]
      [13034.950247]  [<ffffffffa03b07ee>] bl_read_cleanup+0x2e/0x60 [blocklayoutdriver]
      [13034.952156]  [<ffffffff810ebf62>] process_one_work+0x412/0x870
      [13034.954102]  [<ffffffff810ebe84>] ? process_one_work+0x334/0x870
      [13034.955949]  [<ffffffff810ebb50>] ? queue_delayed_work_on+0x40/0x40
      [13034.957985]  [<ffffffff810ec441>] worker_thread+0x81/0x6a0
      [13034.959817]  [<ffffffff810ec3c0>] ? process_one_work+0x870/0x870
      [13034.961785]  [<ffffffff810f43bd>] kthread+0x17d/0x1a0
      [13034.963544]  [<ffffffff810f4240>] ? kthread_create_on_node+0x330/0x330
      [13034.965479]  [<ffffffff81100428>] ? finish_task_switch+0x88/0x220
      [13034.967223]  [<ffffffff810f4240>] ? kthread_create_on_node+0x330/0x330
      [13034.968929]  [<ffffffff81b6ae5f>] ret_from_fork+0x3f/0x70
      [13034.970534]  [<ffffffff810f4240>] ? kthread_create_on_node+0x330/0x330
      [13034.972176] Code: c7 43 50 40 84 0d a0 e8 3d fe 1c e1 48 8d 7b 58 c7 83 e4 00 00 00 00 00 00 00 e8 ca fe 1c e1 4c 8b 63 58 4c 89 e7 e8 be fe 1c e1 <49> 83 3c 24 00 74 12 48 c7 43 50 f0 a2 0e a0 b8 01 00 00 00 5b
      [13034.977148] RIP  [<ffffffffa00db372>] rpc_restart_call_prepare+0x62/0x90 [sunrpc]
      [13034.978780]  RSP <ffff880035e97b58>
      [13034.980399] CR2: 0000000000000000
      Signed-off-by: default avatarKinglong Mee <kinglongmee@gmail.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      f8417b48
    • Kinglong Mee's avatar
      nfs/blocklayout: Fix bad using of page offset in bl_read_pagelist · 15ae2c7b
      Kinglong Mee authored
      Blocklayout uses file offset for the read-back page's offset of first writing,
      it's definitely wrong, it writes data to bad address of page that cause userspace
      application segment fault. It must be the page base stored in header->args.pgbase.
      
      Also, the pg_offset has no influence with isect and extent length.
      
      Note: The offset of the non-first page is always zero.
      
      Ps: A test program will segment fault at read() as,
      #define _GNU_SOURCE
      
      #include <stdio.h>
      #include <stdlib.h>
      #include <sys/types.h>
      #include <sys/stat.h>
      #include <unistd.h>
      #include <fcntl.h>
      #include <errno.h>
      
      int main(int argc, char **argv)
      {
              char buf[2049];
              char *filename = NULL;
              int fd = -1;
      
              if (argc < 2) {
                      printf("Usage: %s filename\n", argv[0]);
                      return 0;
              }
      
              filename = argv[1];
              fd = open(filename, O_RDONLY | O_DIRECT);
              if (fd < 0) {
                      printf("Open %s fail: %m\n", filename);
                      return 1;
              }
      
              lseek(fd, 2048, SEEK_SET);
              if (read(fd, buf, sizeof(buf) - 1) != (sizeof(buf) - 1))
                      printf("Read 4096 bityes data from %s fail: %m\n", filename);
      out:
              close(fd);
              return 0;
      }
      Signed-off-by: default avatarKinglong Mee <kinglongmee@gmail.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      15ae2c7b
    • Kinglong Mee's avatar
      NFS: Return directly if encode_sessionid fail · e0a63c0b
      Kinglong Mee authored
      encode_sessionid() may return error, nfs needs process the return value.
      Signed-off-by: default avatarKinglong Mee <kinglongmee@gmail.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      e0a63c0b
    • Kinglong Mee's avatar
      NFS: Fix bad checking of max taglen in callback request · 403889c0
      Kinglong Mee authored
      The taglen should be checked with CB_OP_TAGLEN_MAXSZ directly.
      Signed-off-by: default avatarKinglong Mee <kinglongmee@gmail.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      403889c0
    • Kinglong Mee's avatar
      NFS: Fix bad defines of callback response maxsize · 45724e8a
      Kinglong Mee authored
      As CB_OP_TAGLEN_MAXSZ, all XXX_MAXSZ should be defined as bit.
      Each operation should not cantains CB_OP_TAGLEN_MAXSZ.
      Signed-off-by: default avatarKinglong Mee <kinglongmee@gmail.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      45724e8a
    • Kinglong Mee's avatar
      NFS: Use NFS4_MAX_SESSIONID_LEN directly for decode/encode sessionid · 590184a6
      Kinglong Mee authored
      It's no need to define a temporary variables for NFS4_MAX_SESSIONID_LEN.
      Signed-off-by: default avatarKinglong Mee <kinglongmee@gmail.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      590184a6
    • Kinglong Mee's avatar
      NFS: Remove unneeded NFS_DEBUG checking before define NFSDBG_FACILITY · 39de493e
      Kinglong Mee authored
      It's not needed to checking NFS_DEBUG before define NFSDBG_FACILITY, remove it.
      Signed-off-by: default avatarKinglong Mee <kinglongmee@gmail.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      39de493e
    • Kinglong Mee's avatar
      NFS: Remove the left function defines in callback.h · f765bf76
      Kinglong Mee authored
      Commit 778be232 "NFS do not find client in NFSv4 pg_authenticate" has remove
      the define and using of nfs4_set_callback_sessionid(), and
      commit 36281caa "NFSv4: Further clean-ups of delegation stateid validation"
      has update the checking of stateid, and move the code to nfs4proc.c.
      
      This patch remove those function defines left in callback.h
      Signed-off-by: default avatarKinglong Mee <kinglongmee@gmail.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      f765bf76
    • Kinglong Mee's avatar
      NFS: Remove the left global variable nfs_callback_tcpport · 8c163d8e
      Kinglong Mee authored
      Commit bbe0a3aa "NFS: make nfs_callback_tcpport per network context" has
      make nfs_callback_tcpport per network, but left the global nfs_callback_tcpport,
      remove it.
      Signed-off-by: default avatarKinglong Mee <kinglongmee@gmail.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      8c163d8e
    • Kinglong Mee's avatar
      NFS: Get rid of the unneeded addr stored in callback arguments · d4e2ce09
      Kinglong Mee authored
      Commit c36fca52 "NFS refactor nfs_find_client and reference client
      across callback processing" has store clp in cb_process_state
      which is set in cb_sequence.
      
      So that, it's unneeded to store address pointer in any callback arguments.
      Signed-off-by: default avatarKinglong Mee <kinglongmee@gmail.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      d4e2ce09
    • Li RongQing's avatar
      nfsroot: make nfsroot to accept the 1024 bytes long directory name · c6466193
      Li RongQing authored
      although NFS_MAXPATHLEN is defined to 1024, nfs client hopes to accept
      a 1024 byte path, but nfs_root_parms is limited to 256, and the nfs path
      will truncated when a user inputs nfs path from kernel cmdline
      
      enlarge nfs_root_parms to 1024, to make it accept the 1024 bytes long
      directory name, since nfs_root_parms is defined as _initdata, it will
      be released after system bootup
      Signed-off-by: default avatarLi RongQing <roy.qing.li@gmail.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      c6466193
    • Trond Myklebust's avatar
      Merge branch 'nfsclone' · 51e0164e
      Trond Myklebust authored
      * nfsclone:
        nfs: add missing linux/types.h
        NFS: Fix an 'unused variable' complaint when #ifndef CONFIG_NFS_V4_2
        nfs42: add NFS_IOC_CLONE_RANGE ioctl
        nfs42: respect clone_blksize
        nfs: get clone_blksize when probing fsinfo
        nfs42: add NFS_IOC_CLONE ioctl
        nfs42: add CLONE proc functions
        nfs42: add CLONE xdr functions
      51e0164e
    • Peng Tao's avatar
      nfs: add missing linux/types.h · b9788a44
      Peng Tao authored
      After merging the nfs tree, today's linux-next build (powerpc allyesconfig
      produced this warning:
      
      ./usr/include/linux/nfs.h:40: found __[us]{8,16,32,64} type without #include <linux/types.h>
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarPeng Tao <tao.peng@primarydata.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      b9788a44
  4. 18 Oct, 2015 2 commits
    • Linus Torvalds's avatar
      Linux 4.3-rc6 · 7379047d
      Linus Torvalds authored
      7379047d
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · c44b3255
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "Here are some bugfixes for the I2C subsystem.
      
        Kieran found a flaw in the recently renewed wake irq handling.  Mika
        handled a user bug report where the ACPI info turned out to be
        unusable.  I updated MAINTAINERS so that such bug reports will sooner
        get to the right people.  Geert pointed me to a problem of some i2c
        drivers regarding PM which I fixed"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: designware: Do not use parameters from ACPI on Dell Inspiron 7348
        MAINTAINERS: add maintainers for Synopsis Designware I2C drivers
        i2c: designware-platdrv: enable RuntimePM before registering to the core
        i2c: s3c2410: enable RuntimePM before registering to the core
        i2c: rcar: enable RuntimePM before registering to the core
        i2c: return probe deferred status on dev_pm_domain_attach
      c44b3255