1. 16 Dec, 2016 1 commit
  2. 06 Dec, 2016 1 commit
  3. 30 Nov, 2016 10 commits
    • Chuck Lever's avatar
      svcrdma: Further clean-up of svc_rdma_get_inv_rkey() · fafedf81
      Chuck Lever authored
      No longer any need for the dprintk().
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      fafedf81
    • Chuck Lever's avatar
      svcrdma: Break up dprintk format in svc_rdma_accept() · 07257450
      Chuck Lever authored
      The current code results in:
      
      Nov  7 14:50:19 klimt kernel: svcrdma: newxprt->sc_cm_id=ffff88085590c800,
       newxprt->sc_pd=ffff880852a7ce00#012    cm_id->device=ffff88084dd20000,
       sc_pd->device=ffff88084dd20000#012    cap.max_send_wr = 272#012
       cap.max_recv_wr = 34#012    cap.max_send_sge = 32#012
       cap.max_recv_sge = 32
      Nov  7 14:50:19 klimt kernel: svcrdma: new connection ffff880855908000
       accepted with the following attributes:#012    local_ip        :
       10.0.0.5#012    local_port#011     : 20049#012    remote_ip       :
       10.0.0.2#012    remote_port     : 59909#012    max_sge         : 32#012
       max_sge_rd      : 30#012    sq_depth        : 272#012    max_requests    :
       32#012    ord             : 16
      
      Split up the output over multiple dprintks and take the opportunity
      to fix the display of IPv6 addresses.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      07257450
    • Chuck Lever's avatar
      svcrdma: Remove unused variable in rdma_copy_tail() · f5426d37
      Chuck Lever authored
      Clean up.
      
      linux-2.6/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c: In function
       ‘rdma_copy_tail’:
      linux-2.6/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c:376:6: warning:
       variable ‘ret’ set but not used [-Wunused-but-set-variable]
        int ret;
            ^
      
      Fixes: a97c331f ("svcrdma: Handle additional inline content")
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      f5426d37
    • Chuck Lever's avatar
      svcrdma: Remove unused variables in xprt_rdma_bc_allocate() · 9a16a34d
      Chuck Lever authored
      Clean up.
      
      /linux-2.6/net/sunrpc/xprtrdma/svc_rdma_backchannel.c: In function
       ‘xprt_rdma_bc_allocate’:
      linux-2.6/net/sunrpc/xprtrdma/svc_rdma_backchannel.c:169:23: warning:
       variable ‘rdma’ set but not used [-Wunused-but-set-variable]
        struct svcxprt_rdma *rdma;
                             ^
      
      Fixes: 5d252f90 ("svcrdma: Add class for RDMA backwards ...")
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      9a16a34d
    • Chuck Lever's avatar
      svcrdma: Remove svc_rdma_op_ctxt::wc_status · 96a58f9c
      Chuck Lever authored
      Clean up: Completion status is already reported in the individual
      completion handlers. Save a few bytes in struct svc_rdma_op_ctxt.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      96a58f9c
    • Chuck Lever's avatar
      svcrdma: Remove DMA map accounting · dd6fd213
      Chuck Lever authored
      Clean up: sc_dma_used is not required for correct operation. It is
      simply a debugging tool to report when svcrdma has leaked DMA maps.
      
      However, manipulating an atomic has a measurable CPU cost, and DMA
      map accounting specific to svcrdma will be meaningless once svcrdma
      is converted to use the new generic r/w API.
      
      A similar kind of debug accounting can be done simply by enabling
      the IOMMU or by using CONFIG_DMA_API_DEBUG, CONFIG_IOMMU_DEBUG, and
      CONFIG_IOMMU_LEAK.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      dd6fd213
    • Chuck Lever's avatar
      svcrdma: Remove BH-disabled spin locking in svc_rdma_send() · e4eb42ce
      Chuck Lever authored
      svcrdma's current SQ accounting algorithm takes sc_lock and disables
      bottom-halves while posting all RDMA Read, Write, and Send WRs.
      
      This is relatively heavyweight serialization. And note that Write and
      Send are already fully serialized by the xpt_mutex.
      
      Using a single atomic_t should be all that is necessary to guarantee
      that ib_post_send() is called only when there is enough space on the
      send queue. This is what the other RDMA-enabled storage targets do.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      e4eb42ce
    • Chuck Lever's avatar
      svcrdma: Renovate sendto chunk list parsing · 5fdca653
      Chuck Lever authored
      The current sendto code appears to support clients that provide only
      one of a Read list, a Write list, or a Reply chunk. My reading of
      that code is that it doesn't support the following cases:
      
       - Read list + Write list
       - Read list + Reply chunk
       - Write list + Reply chunk
       - Read list + Write list + Reply chunk
      
      The protocol allows more than one Read or Write chunk in those
      lists. Some clients do send a Read list and Reply chunk
      simultaneously. NFSv4 WRITE uses a Read list for the data payload,
      and a Reply chunk because the GETATTR result in the reply can
      contain a large object like an ACL.
      
      Generalize one of the sendto code paths needed to support all of
      the above cases, and attempt to ensure that only one pass is done
      through the RPC Call's transport header to gather chunk list
      information for building the reply.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      5fdca653
    • Chuck Lever's avatar
      svcauth_gss: Close connection when dropping an incoming message · 4d712ef1
      Chuck Lever authored
      S5.3.3.1 of RFC 2203 requires that an incoming GSS-wrapped message
      whose sequence number lies outside the current window is dropped.
      The rationale is:
      
        The reason for discarding requests silently is that the server
        is unable to determine if the duplicate or out of range request
        was due to a sequencing problem in the client, network, or the
        operating system, or due to some quirk in routing, or a replay
        attack by an intruder.  Discarding the request allows the client
        to recover after timing out, if indeed the duplication was
        unintentional or well intended.
      
      However, clients may rely on the server dropping the connection to
      indicate that a retransmit is needed. Without a connection reset, a
      client can wait forever without retransmitting, and the workload
      just stops dead. I've reproduced this behavior by running xfstests
      generic/323 on an NFSv4.0 mount with proto=rdma and sec=krb5i.
      
      To address this issue, have the server close the connection when it
      silently discards an incoming message due to a GSS sequence number
      problem.
      
      There are a few other places where the server will never reply.
      Change those spots in a similar fashion.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      4d712ef1
    • Chuck Lever's avatar
      svcrdma: Clear xpt_bc_xps in xprt_setup_rdma_bc() error exit arm · 1b9f700b
      Chuck Lever authored
      Logic copied from xs_setup_bc_tcp().
      
      Fixes: 39a9beab ('rpc: share one xps between all backchannels')
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      1b9f700b
  4. 14 Nov, 2016 2 commits
  5. 01 Nov, 2016 7 commits
    • J. Bruce Fields's avatar
      sunrpc: GFP_KERNEL should be GFP_NOFS in crypto code · 56094edd
      J. Bruce Fields authored
      Writes may depend on the auth_gss crypto code, so we shouldn't be
      allocating with GFP_KERNEL there.
      
      This still leaves some crypto_alloc_* calls which end up doing
      GFP_KERNEL allocations in the crypto code.  Those could probably done at
      crypto import time.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      56094edd
    • J. Bruce Fields's avatar
      nfsd: catch errors in decode_fattr earlier · e864c189
      J. Bruce Fields authored
      3c8e0316 "NFSv4: do exact check about attribute specified" fixed
      some handling of unsupported-attribute errors, but it also delayed
      checking for unwriteable attributes till after we decode them.  This
      could lead to odd behavior in the case a client attemps to set an
      attribute we don't know about followed by one we try to parse.  In that
      case the parser for the known attribute will attempt to parse the
      unknown attribute.  It should fail in some safe way, but the error might
      at least be incorrect (probably bad_xdr instead of inval).  So, it's
      better to do that check at the start.
      
      As far as I know this doesn't cause any problems with current clients
      but it might be a minor issue e.g. if we encounter a future client that
      supports a new attribute that we currently don't.
      
      Cc: Yu Zhiguo <yuzg@cn.fujitsu.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      e864c189
    • J. Bruce Fields's avatar
      nfsd: clean up supported attribute handling · 916d2d84
      J. Bruce Fields authored
      Minor cleanup, no change in behavior.
      
      Provide helpers for some common attribute bitmap operations.  Drop some
      comments that just echo the code.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      916d2d84
    • Jeff Layton's avatar
      nfsd: fix error handling for clients that fail to return the layout · 851238a2
      Jeff Layton authored
      Currently, when the client continually returns NFS4ERR_DELAY on a
      CB_LAYOUTRECALL, we'll give up trying to retransmit after two lease
      periods, but leave the layout in place.
      
      What we really need to do here is fence the client in this case. Have it
      fall through to that code in that case instead of into the
      NFS4ERR_NOMATCHING_LAYOUT case.
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      851238a2
    • Jeff Layton's avatar
      nfsd: more robust allocation failure handling in nfsd_reply_cache_init · 8f97514b
      Jeff Layton authored
      Currently, we try to allocate the cache as a single, large chunk, which
      can fail if no big chunks of memory are available. We _do_ try to size
      it according to the amount of memory in the box, but if the server is
      started well after boot time, then the allocation can fail due to memory
      fragmentation.
      
      Fall back to doing a vzalloc if the kcalloc fails, and switch the
      shutdown code to do a kvfree to handle freeing correctly.
      Reported-by: default avatarOlaf Hering <olaf@aepfle.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      8f97514b
    • Chuck Lever's avatar
      nfsd: Fix general protection fault in release_lock_stateid() · f46c445b
      Chuck Lever authored
      When I push NFSv4.1 / RDMA hard, (xfstests generic/089, for example),
      I get this crash on the server:
      
      Oct 28 22:04:30 klimt kernel: general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC
      Oct 28 22:04:30 klimt kernel: Modules linked in: cts rpcsec_gss_krb5 iTCO_wdt iTCO_vendor_support sb_edac edac_core x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm btrfs irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ablk_helper cryptd xor pcspkr raid6_pq i2c_i801 i2c_smbus lpc_ich mfd_core sg mei_me mei ioatdma shpchp wmi ipmi_si ipmi_msghandler rpcrdma ib_ipoib rdma_ucm acpi_power_meter acpi_pad ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c mlx4_ib mlx4_en ib_core sr_mod cdrom sd_mod ast drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm crc32c_intel igb ahci libahci ptp mlx4_core pps_core dca libata i2c_algo_bit i2c_core dm_mirror dm_region_hash dm_log dm_mod
      Oct 28 22:04:30 klimt kernel: CPU: 7 PID: 1558 Comm: nfsd Not tainted 4.9.0-rc2-00005-g82cd754 #8
      Oct 28 22:04:30 klimt kernel: Hardware name: Supermicro Super Server/X10SRL-F, BIOS 1.0c 09/09/2015
      Oct 28 22:04:30 klimt kernel: task: ffff880835c3a100 task.stack: ffff8808420d8000
      Oct 28 22:04:30 klimt kernel: RIP: 0010:[<ffffffffa05a759f>]  [<ffffffffa05a759f>] release_lock_stateid+0x1f/0x60 [nfsd]
      Oct 28 22:04:30 klimt kernel: RSP: 0018:ffff8808420dbce0  EFLAGS: 00010246
      Oct 28 22:04:30 klimt kernel: RAX: ffff88084e6660f0 RBX: ffff88084e667020 RCX: 0000000000000000
      Oct 28 22:04:30 klimt kernel: RDX: 0000000000000007 RSI: 0000000000000000 RDI: ffff88084e667020
      Oct 28 22:04:30 klimt kernel: RBP: ffff8808420dbcf8 R08: 0000000000000001 R09: 0000000000000000
      Oct 28 22:04:30 klimt kernel: R10: ffff880835c3a100 R11: ffff880835c3aca8 R12: 6b6b6b6b6b6b6b6b
      Oct 28 22:04:30 klimt kernel: R13: ffff88084e6670d8 R14: ffff880835f546f0 R15: ffff880835f1c548
      Oct 28 22:04:30 klimt kernel: FS:  0000000000000000(0000) GS:ffff88087bdc0000(0000) knlGS:0000000000000000
      Oct 28 22:04:30 klimt kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      Oct 28 22:04:30 klimt kernel: CR2: 00007ff020389000 CR3: 0000000001c06000 CR4: 00000000001406e0
      Oct 28 22:04:30 klimt kernel: Stack:
      Oct 28 22:04:30 klimt kernel: ffff88084e667020 0000000000000000 ffff88084e6670d8 ffff8808420dbd20
      Oct 28 22:04:30 klimt kernel: ffffffffa05ac80d ffff880835f54548 ffff88084e640008 ffff880835f545b0
      Oct 28 22:04:30 klimt kernel: ffff8808420dbd70 ffffffffa059803d ffff880835f1c768 0000000000000870
      Oct 28 22:04:30 klimt kernel: Call Trace:
      Oct 28 22:04:30 klimt kernel: [<ffffffffa05ac80d>] nfsd4_free_stateid+0xfd/0x1b0 [nfsd]
      Oct 28 22:04:30 klimt kernel: [<ffffffffa059803d>] nfsd4_proc_compound+0x40d/0x690 [nfsd]
      Oct 28 22:04:30 klimt kernel: [<ffffffffa0583114>] nfsd_dispatch+0xd4/0x1d0 [nfsd]
      Oct 28 22:04:30 klimt kernel: [<ffffffffa047bbf9>] svc_process_common+0x3d9/0x700 [sunrpc]
      Oct 28 22:04:30 klimt kernel: [<ffffffffa047ca64>] svc_process+0xf4/0x330 [sunrpc]
      Oct 28 22:04:30 klimt kernel: [<ffffffffa05827ca>] nfsd+0xfa/0x160 [nfsd]
      Oct 28 22:04:30 klimt kernel: [<ffffffffa05826d0>] ? nfsd_destroy+0x170/0x170 [nfsd]
      Oct 28 22:04:30 klimt kernel: [<ffffffff810b367b>] kthread+0x10b/0x120
      Oct 28 22:04:30 klimt kernel: [<ffffffff810b3570>] ? kthread_stop+0x280/0x280
      Oct 28 22:04:30 klimt kernel: [<ffffffff8174e8ba>] ret_from_fork+0x2a/0x40
      Oct 28 22:04:30 klimt kernel: Code: c3 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 48 89 e5 41 55 41 54 53 48 8b 87 b0 00 00 00 48 89 fb 4c 8b a0 98 00 00 00 <49> 8b 44 24 20 48 8d b8 80 03 00 00 e8 10 66 1a e1 48 89 df e8
      Oct 28 22:04:30 klimt kernel: RIP  [<ffffffffa05a759f>] release_lock_stateid+0x1f/0x60 [nfsd]
      Oct 28 22:04:30 klimt kernel: RSP <ffff8808420dbce0>
      Oct 28 22:04:30 klimt kernel: ---[ end trace cf5d0b371973e167 ]---
      
      Jeff Layton says:
      > Hm...now that I look though, this is a little suspicious:
      >
      >    struct nfs4_openowner *oo = openowner(stp->st_openstp->st_stateowner);
      >
      > I wonder if it's possible for the openstateid to have already been
      > destroyed at this point.
      >
      > We might be better off doing something like this to get the client pointer:
      >
      >    stp->st_stid.sc_client;
      >
      > ...which should be more direct and less dependent on other stateids
      > staying valid.
      
      With the suggested change, I am no longer able to reproduce the above oops.
      
      v2: Fix unhash_lock_stateid() as well
      Fix-suggested-by: default avatarJeff Layton <jlayton@redhat.com>
      Fixes: 42691398 ('nfsd: Fix race between FREE_STATEID and LOCK')
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      f46c445b
    • Chuck Lever's avatar
      svcrdma: backchannel cannot share a page for send and rcv buffers · 8d42629b
      Chuck Lever authored
      The underlying transport releases the page pointed to by rq_buffer
      during xprt_rdma_bc_send_request. When the backchannel reply arrives,
      rq_rbuffer then points to freed memory.
      
      Fixes: 68778945 ('SUNRPC: Separate buffer pointers for RPC ...')
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Cc: Jeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      8d42629b
  6. 28 Oct, 2016 1 commit
    • Jeff Layton's avatar
      sunrpc: fix some missing rq_rbuffer assignments · 18e601d6
      Jeff Layton authored
      We've been seeing some crashes in testing that look like this:
      
      BUG: unable to handle kernel NULL pointer dereference at           (null)
      IP: [<ffffffff8135ce99>] memcpy_orig+0x29/0x110
      PGD 212ca2067 PUD 212ca3067 PMD 0
      Oops: 0002 [#1] SMP
      Modules linked in: rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache ppdev parport_pc i2c_piix4 sg parport i2c_core virtio_balloon pcspkr acpi_cpufreq nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod ata_generic pata_acpi virtio_scsi 8139too ata_piix libata 8139cp mii virtio_pci floppy virtio_ring serio_raw virtio
      CPU: 1 PID: 1540 Comm: nfsd Not tainted 4.9.0-rc1 #39
      Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2007
      task: ffff88020d7ed200 task.stack: ffff880211838000
      RIP: 0010:[<ffffffff8135ce99>]  [<ffffffff8135ce99>] memcpy_orig+0x29/0x110
      RSP: 0018:ffff88021183bdd0  EFLAGS: 00010206
      RAX: 0000000000000000 RBX: ffff88020d7fa000 RCX: 000000f400000000
      RDX: 0000000000000014 RSI: ffff880212927020 RDI: 0000000000000000
      RBP: ffff88021183be30 R08: 01000000ef896996 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000000 R12: ffff880211704ca8
      R13: ffff88021473f000 R14: 00000000ef896996 R15: ffff880211704800
      FS:  0000000000000000(0000) GS:ffff88021fc80000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000000 CR3: 0000000212ca1000 CR4: 00000000000006e0
      Stack:
       ffffffffa01ea087 ffffffff63400001 ffff880215145e00 ffff880211bacd00
       ffff88021473f2b8 0000000000000004 00000000d0679d67 ffff880211bacd00
       ffff88020d7fa000 ffff88021473f000 0000000000000000 ffff88020d7faa30
      Call Trace:
       [<ffffffffa01ea087>] ? svc_tcp_recvfrom+0x5a7/0x790 [sunrpc]
       [<ffffffffa01f84d8>] svc_recv+0xad8/0xbd0 [sunrpc]
       [<ffffffffa0262d5e>] nfsd+0xde/0x160 [nfsd]
       [<ffffffffa0262c80>] ? nfsd_destroy+0x60/0x60 [nfsd]
       [<ffffffff810a9418>] kthread+0xd8/0xf0
       [<ffffffff816dbdbf>] ret_from_fork+0x1f/0x40
       [<ffffffff810a9340>] ? kthread_park+0x60/0x60
      Code: 00 00 48 89 f8 48 83 fa 20 72 7e 40 38 fe 7c 35 48 83 ea 20 48 83 ea 20 4c 8b 06 4c 8b 4e 08 4c 8b 56 10 4c 8b 5e 18 48 8d 76 20 <4c> 89 07 4c 89 4f 08 4c 89 57 10 4c 89 5f 18 48 8d 7f 20 73 d4
      RIP  [<ffffffff8135ce99>] memcpy_orig+0x29/0x110
       RSP <ffff88021183bdd0>
      CR2: 0000000000000000
      
      Both Bruce and Eryu ran a bisect here and found that the problematic
      patch was 68778945 (SUNRPC: Separate buffer pointers for RPC Call and
      Reply messages).
      
      That patch changed rpc_xdr_encode to use a new rq_rbuffer pointer to
      set up the receive buffer, but didn't change all of the necessary
      codepaths to set it properly. In particular the backchannel setup was
      missing.
      
      We need to set rq_rbuffer whenever rq_buffer is set. Ensure that it is.
      Reviewed-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Tested-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Reported-by: default avatarEryu Guan <guaneryu@gmail.com>
      Tested-by: default avatarEryu Guan <guaneryu@gmail.com>
      Fixes: 68778945 "SUNRPC: Separate buffer pointers..."
      Reported-by: default avatarJ. Bruce Fields <bfields@fieldses.org>
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      18e601d6
  7. 26 Oct, 2016 1 commit
    • J. Bruce Fields's avatar
      sunrpc: don't pass on-stack memory to sg_set_buf · 2876a344
      J. Bruce Fields authored
      As of ac4e97ab "scatterlist: sg_set_buf() argument must be in linear
      mapping", sg_set_buf hits a BUG when make_checksum_v2->xdr_process_buf,
      among other callers, passes it memory on the stack.
      
      We only need a scatterlist to pass this to the crypto code, and it seems
      like overkill to require kmalloc'd memory just to encrypt a few bytes,
      but for now this seems the best fix.
      
      Many of these callers are in the NFS write paths, so we allocate with
      GFP_NOFS.  It might be possible to do without allocations here entirely,
      but that would probably be a bigger project.
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      2876a344
  8. 24 Oct, 2016 2 commits
  9. 23 Oct, 2016 5 commits
    • Linus Torvalds's avatar
      Merge tag 'upstream-4.9-rc2' of git://git.infradead.org/linux-ubifs · 5ff93abc
      Linus Torvalds authored
      Pull UBI[FS] fixes from Richard Weinberger:
       "This contains fixes for issues in both UBI and UBIFS:
      
         - Fallout from the merge window, refactoring UBI code introduced some
           issues.
      
         - Fixes for an UBIFS readdir bug which can cause getdents() to busy
           loop for ever and a bug in the UBIFS xattr code"
      
      * tag 'upstream-4.9-rc2' of git://git.infradead.org/linux-ubifs:
        ubifs: Abort readdir upon error
        UBI: Fix crash in try_recover_peb()
        ubi: fix swapped arguments to call to ubi_alloc_aeb
        ubifs: Fix xattr_names length in exit paths
        ubifs: Rename ubifs_rename2
      5ff93abc
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · c761923c
      Linus Torvalds authored
      Pull ext4 fixes from Ted Ts'o:
       "A few bug fixes and add some missing KERN_CONT annotations"
      
      * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: add missing KERN_CONT to a few more debugging uses
        fscrypto: lock inode while setting encryption policy
        ext4: correct endianness conversion in __xattr_check_inode()
        fscrypto: make XTS tweak initialization endian-independent
        ext4: do not advertise encryption support when disabled
        jbd2: fix incorrect unlock on j_list_lock
        ext4: super.c: Update logging style using KERN_CONT
      c761923c
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · a55da8a0
      Linus Torvalds authored
      Pull SCSI target fixes from Nicholas Bellinger:
       "Here are the outstanding target-pending fixes for v4.9-rc2.
      
        This includes:
      
         - Fix v4.1.y+ reference leak regression with concurrent TMR
           ABORT_TASK + session shutdown. (Vaibhav Tandon)
      
         - Enable tcm_fc w/ SCF_USE_CPUID to avoid host exchange timeouts
           (Hannes)
      
         - target/user error sense handling fixes. (Andy + MNC + HCH)
      
         - Fix iscsi-target NOP_OUT error path iscsi_cmd descriptor leak
           (Varun)
      
         - Two EXTENDED_COPY SCSI status fixes for ESX VAAI (Dinesh Israni +
           Nixon Vincent)
      
         - Revert a v4.8 residual overflow change, that breaks sg_inq with
           small allocation lengths.
      
        There are a number of folks stress testing the v4.1.y regression fix
        in their environments, and more folks doing iser-target I/O stress
        testing atop recent v4.x.y code.
      
        There is also one v4.2.y+ RCU conversion regression related to
        explicit NodeACL configfs changes, that is still being tracked down"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
        target/tcm_fc: use CPU affinity for responses
        target/tcm_fc: Update debugging statements to match libfc usage
        target/tcm_fc: return detailed error in ft_sess_create()
        target/tcm_fc: print command pointer in debug message
        target: fix potential race window in target_sess_cmd_list_waiting()
        Revert "target: Fix residual overflow handling in target_complete_cmd_with_length"
        target: Don't override EXTENDED_COPY xcopy_pt_cmd SCSI status code
        target: Make EXTENDED_COPY 0xe4 failure return COPY TARGET DEVICE NOT REACHABLE
        target: Re-add missing SCF_ACK_KREF assignment in v4.1.y
        iscsi-target: fix iscsi cmd leak
        iscsi-target: fix spelling mistake "Unsolicitied" -> "Unsolicited"
        target/user: Fix comments to not refer to data ring
        target/user: Return an error if cmd data size is too large
        target/user: Use sense_reason_t in tcmu_queue_cmd_ring
      a55da8a0
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus-v4.9-rc2' of... · e6995f22
      Linus Torvalds authored
      Merge tag 'hwmon-for-linus-v4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon fixes from Guenter Roeck:
       "Couple of hwmon fixes:
      
        Fix a potential ERR_PTR dereference in max31790 driver, and handle
        temperature readings below 0 in adm9240 driver"
      
      * tag 'hwmon-for-linus-v4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (max31790) potential ERR_PTR dereference
        hwmon: (adm9240) handle temperature readings below 0
      e6995f22
    • Linus Torvalds's avatar
      Merge tag 'for-linus-4.9-2' of git://git.code.sf.net/p/openipmi/linux-ipmi · 5766e9d2
      Linus Torvalds authored
      Pull IPMI updates from Corey Minyard:
       "A small bug fix and a new driver for acting as an IPMI device.
      
        I was on vacation during the merge window (a long vacation) but this
        is a bug fix that should go in and a new driver that shouldn't hurt
        anything.
      
        This has been in linux-next for a month or so"
      
      * tag 'for-linus-4.9-2' of git://git.code.sf.net/p/openipmi/linux-ipmi:
        ipmi: fix crash on reading version from proc after unregisted bmc
        ipmi/bt-bmc: remove redundant return value check of platform_get_resource()
        ipmi/bt-bmc: add a dependency on ARCH_ASPEED
        ipmi: Fix ioremap error handling in bt-bmc
        ipmi: add an Aspeed BT IPMI BMC driver
      5766e9d2
  10. 22 Oct, 2016 9 commits
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0c2b6dc4
      Linus Torvalds authored
      Pull timer updates from Thomas Gleixner:
       "This updates contains:
      
         - A revert which addresses a boot failure on ARM Sun5i platforms
      
         - A new clocksource driver, which has been delayed beyond rc1 due to
           an interrupt driver issue which was unearthed by this driver. The
           debugging of that issue and the discussion about the proper
           solution made this driver miss the merge window. There is no point
           in delaying it for a full cycle as it completes the basic mainline
           support for the new JCore platform and does not create any risk
           outside of that platform"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        Revert "clocksource/drivers/timer_sun5i: Replace code by clocksource_mmio_init"
        clocksource: Add J-Core timer/clocksource driver
        of: Add J-Core timer bindings
      0c2b6dc4
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3e9679a3
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Three fixes, a hw-enablement and a cross-arch fix/enablement change:
      
         - SGI/UV fix for older platforms
      
         - x32 signal handling fix
      
         - older x86 platform bootup APIC fix
      
         - AVX512-4VNNIW (Neural Network Instructions) and AVX512-4FMAPS
           (Multiply Accumulation Single precision instructions) enablement.
      
         - move thread_info back into x86 specific code, to make life easier
           for other architectures trying to make use of
           CONFIG_THREAD_INFO_IN_TASK_STRUCT=y"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/boot/smp: Don't try to poke disabled/non-existent APIC
        sched/core, x86: Make struct thread_info arch specific again
        x86/signal: Remove bogus user_64bit_mode() check from sigaction_compat_abi()
        x86/platform/UV: Fix support for EFI_OLD_MEMMAP after BIOS callback updates
        x86/cpufeature: Add AVX512_4VNNIW and AVX512_4FMAPS features
        x86/vmware: Skip timer_irq_works() check on VMware
      3e9679a3
    • Linus Torvalds's avatar
      Merge branch 'mm-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 86c5bf71
      Linus Torvalds authored
      Pull vmap stack fixes from Ingo Molnar:
       "This is fallout from CONFIG_HAVE_ARCH_VMAP_STACK=y on x86: stack
        accesses that used to be just somewhat questionable are now totally
        buggy.
      
        These changes try to do it without breaking the ABI: the fields are
        left there, they are just reporting zero, or reporting narrower
        information (the maps file change)"
      
      * 'mm-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        mm: Change vm_is_stack_for_task() to vm_is_stack_for_current()
        fs/proc: Stop trying to report thread stacks
        fs/proc: Stop reporting eip and esp in /proc/PID/stat
        mm/numa: Remove duplicated include from mprotect.c
      86c5bf71
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · bfb7bfef
      Linus Torvalds authored
      Pull irq fixes from Ingo Molnar:
       "Mostly irqchip driver fixes, plus a symbol export"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        kernel/irq: Export irq_set_parent()
        irqchip/gic: Add missing \n to CPU IF adjustment message
        irqchip/jcore: Don't show Kconfig menu item for driver
        irqchip/eznps: Drop pointless static qualifier in nps400_of_init()
        irqchip/gic-v3-its: Fix entry size mask for GITS_BASER
        irqchip/gic-v3-its: Fix 64bit GIC{R,ITS}_TYPER accesses
      bfb7bfef
    • Linus Torvalds's avatar
      Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 90e01058
      Linus Torvalds authored
      Pull EFI fixes from Ingo Molnar:
       "Add Ard Biesheuvel as EFI co-maintainer, plus fix an ARM build bug
        with older toolchains"
      
      * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi/arm: Fix absolute relocation detection for older toolchains
        MAINTAINERS: Add myself as EFI maintainer
      90e01058
    • Ville Syrjälä's avatar
      x86/boot/smp: Don't try to poke disabled/non-existent APIC · ff856051
      Ville Syrjälä authored
      Apparently trying to poke a disabled or non-existent APIC
      leads to a box that doesn't even boot. Let's not do that.
      
      No real clue if this is the right fix, but at least my
      P3 machine boots again.
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Eric Biederman <ebiederm@xmission.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: dyoung@redhat.com
      Cc: kexec@lists.infradead.org
      Cc: stable@vger.kernel.org
      Fixes: 2a51fe08 ("arch/x86: Handle non enumerated CPU after physical hotplug")
      Link: http://lkml.kernel.org/r/1477102684-5092-1-git-send-email-ville.syrjala@linux.intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      ff856051
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · dcd4693c
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "Fixes marked for stable:
         - Prevent unlikely crash in copro_calculate_slb() (Frederic Barrat)
         - cxl: Prevent adapter reset if an active context exists (Vaibhav Jain)
      
        Fixes for code merged this cycle:
         - Fix boot on systems with uncompressed kernel image (Heiner Kallweit)
         - Drop dump_numa_memory_topology() (Michael Ellerman)
         - Fix numa topology console print (Aneesh Kumar K.V)
         - Ignore the pkey system calls for now (Stephen Rothwell)"
      
      * tag 'powerpc-4.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc: Ignore the pkey system calls for now
        powerpc: Fix numa topology console print
        powerpc/mm: Drop dump_numa_memory_topology()
        cxl: Prevent adapter reset if an active context exists
        powerpc/boot: Fix boot on systems with uncompressed kernel image
        powerpc/mm: Prevent unlikely crash in copro_calculate_slb()
      dcd4693c
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · a23b27ae
      Linus Torvalds authored
      Pull KVM fixes from Radim Krčmář:
       "ARM:
         - avoid livelock when walking guest page tables
         - fix HYP mode static keys without CC_HAVE_ASM_GOTO
      
        MIPS:
         - fix a build error without TRACEPOINTS_ENABLED
      
        s390:
         - reject a malformed userspace configuration
      
        x86:
         - suppress a warning without CONFIG_CPU_FREQ
         - initialize whole irq_eoi array"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        arm/arm64: KVM: Map the BSS at HYP
        arm64: KVM: Take S1 walks into account when determining S2 write faults
        KVM: s390: reject invalid modes for runtime instrumentation
        kvm: x86: memset whole irq_eoi
        kvm/x86: Fix unused variable warning in kvm_timer_init()
        KVM: MIPS: Add missing uaccess.h include
      a23b27ae
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-4.9-2' of git://git.linux-nfs.org/projects/anna/linux-nfs · 02593ac6
      Linus Torvalds authored
      Pull NFS client bugfixes from Anna Schumaker:
       "Just two bugfixes this time:
      
        Stable bugfix:
         - Fix last_write_offset incorrectly set to page boundary
      
        Other bugfix:
         - Fix missing-braces warning"
      
      * tag 'nfs-for-4.9-2' of git://git.linux-nfs.org/projects/anna/linux-nfs:
        nfs4: fix missing-braces warning
        pnfs/blocklayout: fix last_write_offset incorrectly set to page boundary
      02593ac6
  11. 21 Oct, 2016 1 commit