1. 12 Dec, 2014 1 commit
    • Jens Axboe's avatar
      NVMe: fix race condition in nvme_submit_sync_cmd() · 849c6e77
      Jens Axboe authored
      If we have a race between the schedule timing out and the command
      completing, we could have the task issuing the command exit
      nvme_submit_sync_cmd() while the irq is running sync_completion().
      If that happens, we could be corrupting memory, since the stack
      that held 'cmdinfo' is no longer valid.
      
      Fix this by always calling nvme_abort_cmd_info(). Once that call
      completes, we know that we have either run sync_completion() if
      the completion came in, or that we will never run it since we now
      have special_completion() as the command callback handler.
      Acked-by: default avatarKeith Busch <keith.busch@intel.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      849c6e77
  2. 11 Dec, 2014 2 commits
    • Jens Axboe's avatar
      NVMe: fix retry/error logic in nvme_queue_rq() · fe54303e
      Jens Axboe authored
      The logic around retrying and erroring IO in nvme_queue_rq() is broken
      in a few ways:
      
      - If we fail allocating dma memory for a discard, we return retry. We
        have the 'iod' stored in ->special, but we free the 'iod'.
      
      - For a normal request, if we fail dma mapping of setting up prps, we
        have the same iod situation. Additionally, we haven't set the callback
        for the request yet, so we also potentially leak IOMMU resources.
      
      Get rid of the ->special 'iod' store. The retry is uncommon enough that
      it's not worth optimizing for or holding on to resources to attempt to
      speed it up. Additionally, it's usually best practice to free any
      request related resources when doing retries.
      Acked-by: default avatarKeith Busch <keith.busch@intel.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      fe54303e
    • Indraneel M's avatar
      NVMe: Fix FS mount issue (hot-remove followed by hot-add) · 285dffc9
      Indraneel M authored
      After Hot-remove of a device with a mounted partition,
      when the device is hot-added again, the new node reappears
      as nvme0n1. Mounting this new node fails with the error:
      
      mount: mount /dev/nvme0n1p1 on /mnt failed: File exists.
      
      The old nodes's FS entries still exist and the kernel can't re-create
      procfs and sysfs entries for the new node with the same name.
      The patch fixes this issue.
      Acked-by: default avatarKeith Busch <keith.busch@intel.com>
      Signed-off-by: default avatarIndraneel M <indraneel.m@samsung.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      285dffc9
  3. 10 Dec, 2014 5 commits
  4. 04 Dec, 2014 1 commit
  5. 26 Nov, 2014 1 commit
  6. 24 Nov, 2014 7 commits
  7. 22 Nov, 2014 1 commit
    • Keith Busch's avatar
      NVMe: Update module version major number · c78b4713
      Keith Busch authored
      It's already near impossible to tell what bits someone is running based on
      a 'modinfo nvme', and I don't want to try guessing if someone is running
      blk-mq or bio-based. Let's make it obvious with the module version that
      the blk-mq conversion is a major change. Future bio-based versions can
      increment to 0.10 in a fork if revisions occur.
      Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      c78b4713
  8. 20 Nov, 2014 2 commits
  9. 19 Nov, 2014 3 commits
  10. 18 Nov, 2014 2 commits
  11. 17 Nov, 2014 7 commits
    • Jens Axboe's avatar
      NVMe: replace blk_put_request() with blk_mq_free_request() · 9d135bb8
      Jens Axboe authored
      No point in using blk_put_request(), since we know we are blk-mq.
      This only makes sense in core code where we could be dealing with
      either legacy or blk-mq drivers. Additionally, use
      blk_mq_free_hctx_request() for the request completion fast path,
      where we already know the mapping from request to hardware queue.
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      9d135bb8
    • Jens Axboe's avatar
      8d76d101
    • Jens Axboe's avatar
      blk-mq: add blk_mq_free_hctx_request() · 7c7f2f2b
      Jens Axboe authored
      It's silly to use blk_mq_free_request() which in turn maps the
      request to the hardware queue, for places where we already know
      what the hardware queue is. This saves us an extra mapping of a
      hardware queue on request completion, if the caller knows this
      information already.
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      7c7f2f2b
    • Jens Axboe's avatar
      blk-mq: export blk_mq_free_request() · 1a3b595a
      Jens Axboe authored
      Drivers that know they are blk-mq should just use this function
      instead of calling through blk_put_request().
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      1a3b595a
    • Linus Torvalds's avatar
      Linux 3.18-rc5 · fc14f9c1
      Linus Torvalds authored
      fc14f9c1
    • Linus Torvalds's avatar
      Merge tag 'armsoc-for-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · e35c5a27
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "Another small set of fixes:
      
         - some DT compatible typo fixes
         - irq setup fix dealing with irq storms on orion
         - i2c quirk generalization for mvebu
         - a handful of smaller fixes for OMAP
         - a couple of added file patterns for OMAP entries in MAINTAINERS"
      
      * tag 'armsoc-for-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: at91/dt: Fix sama5d3x typos
        pinctrl: dra: dt-bindings: Fix output pull up/down
        MAINTAINERS: Update entry for omap related .dts files to cover new SoCs
        MAINTAINERS: add more files under OMAP SUPPORT
        ARM: dts: AM437x-SK-EVM: Fix DCDC3 voltage
        ARM: dts: AM437x-GP-EVM: Fix DCDC3 voltage
        ARM: dts: AM43x-EPOS-EVM: Fix DCDC3 voltage
        ARM: dts: am335x-evm: Fix 5th NAND partition's name
        ARM: orion: Fix for certain sequence of request_irq can cause irq storm
        ARM: mvebu: armada xp: Generalize use of i2c quirk
      e35c5a27
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 435e46f5
      Linus Torvalds authored
      Pull sparc fixes from David Miller:
      
       1) Fix NULL oops in Schizo PCI controller error handler.
      
       2) Fix race between xchg and other operations on 32-bit sparc, from
          Andreas Larsson.
      
       3) swab*() helpers need a dummy memory input operand to show data flow
          on 64-bit sparc.
      
       4) Fix RCU warnings due to missing irq_{enter,exit}() around
          generic_smp_call_function*() calls.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc64: Fix constraints on swab helpers.
        sparc32: Implement xchg and atomic_xchg using ATOMIC_HASH locks
        sparc64: Do irq_{enter,exit}() around generic_smp_call_function*().
        sparc64: Fix crashes in schizo_pcierr_intr_other().
      435e46f5
  12. 16 Nov, 2014 8 commits