1. 31 8月, 2018 5 次提交
    • L
      Merge tag 'pm-4.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · b6935d2a
      Linus Torvalds 提交于
      Pull power management fixes from Rafael Wysocki:
       "These address a corner case in the menu cpuidle governor and fix error
        handling in the PM core's generic clock management code.
      
        Specifics:
      
         - Make the menu cpuidle governor avoid stopping the scheduler tick if
           the predicted idle duration exceeds the tick period length, but the
           selected idle state is shallow and deeper idle states with high
           target residencies are available (Rafael Wysocki).
      
         - Make the PM core's generic clock management code use a proper data
           type for one variable to make error handling work (Dan Carpenter)"
      
      * tag 'pm-4.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpuidle: menu: Retain tick when shallow state is selected
        PM / clk: signedness bug in of_pm_clk_add_clks()
      b6935d2a
    • R
      Merge branch 'pm-core' · a0b9c4de
      Rafael J. Wysocki 提交于
      Merge a generic clock management fix for 4.19-rc2.
      
      * pm-core:
        PM / clk: signedness bug in of_pm_clk_add_clks()
      a0b9c4de
    • L
      Merge tag 'for-linus-20180830' of git://git.kernel.dk/linux-block · fb646385
      Linus Torvalds 提交于
      Pull block fixes from Jens Axboe:
       "Small collection of fixes that should go into this series. This pull
        contains:
      
         - NVMe pull request with three small fixes (via Christoph)
      
         - Kill useless NULL check before kmem_cache_destroy (Chengguang Xu)
      
         - Xen block driver pull request with persistent grant flushing fixes
           (Juergen Gross)
      
         - Final wbt fixes, wrapping up the changes for this series. These
           have been heavily tested (me)
      
         - cdrom info leak fix (Scott Bauer)
      
         - ATA dma quirk for SQ201 (Linus Walleij)
      
         - Straight forward bsg refcount_t conversion (John Pittman)"
      
      * tag 'for-linus-20180830' of git://git.kernel.dk/linux-block:
        cdrom: Fix info leak/OOB read in cdrom_ioctl_drive_status
        nvmet: free workqueue object if module init fails
        nvme-fcloop: Fix dropped LS's to removed target port
        nvme-pci: add a memory barrier to nvme_dbbuf_update_and_check_event
        block: bsg: move atomic_t ref_count variable to refcount API
        block: remove unnecessary condition check
        ata: ftide010: Add a quirk for SQ201
        blk-wbt: remove dead code
        blk-wbt: improve waking of tasks
        blk-wbt: abstract out end IO completion handler
        xen/blkback: remove unused pers_gnts_lock from struct xen_blkif_ring
        xen/blkback: move persistent grants flags to bool
        xen/blkfront: reorder tests in xlblk_init()
        xen/blkfront: cleanup stale persistent grants
        xen/blkback: don't keep persistent grants too long
      fb646385
    • L
      Merge tag 'mtd/for-4.19-rc2' of git://git.infradead.org/linux-mtd · 9f8f16c8
      Linus Torvalds 提交于
      Pull mtd fixes from Boris Brezillon:
       "Raw NAND fixes:
      
         - denali: Fix a regression caused by the nand_scan() rework
      
         - docg4: Fix a build error when gcc decides to not iniline some
           functions (can be reproduced with gcc 4.1.2):
      
      * tag 'mtd/for-4.19-rc2' of git://git.infradead.org/linux-mtd:
        mtd: rawnand: denali: do not pass zero maxchips to nand_scan()
        mtd: rawnand: docg4: Remove wrong __init annotations
      9f8f16c8
    • L
      Merge tag 'mmc-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 48f8e8e9
      Linus Torvalds 提交于
      Pull MMC fixes from Ulf Hansson:
       "MMC core:
         - Fix unsupported parallel dispatch of requests
      
        MMC host:
         - atmel-mci/android-goldfish: Fixup logic of sg_copy_{from,to}_buffer
         - renesas_sdhi_internal_dmac: Prevent IRQ-storm due of DMAC IRQs
         - renesas_sdhi_internal_dmac: Fixup bad register offset"
      
      * tag 'mmc-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: renesas_sdhi_internal_dmac: mask DMAC interrupts
        mmc: renesas_sdhi_internal_dmac: fix #define RST_RESERVED_BITS
        mmc: block: Fix unsupported parallel dispatch of requests
        mmc: android-goldfish: fix bad logic of sg_copy_{from,to}_buffer conversion
        mmc: atmel-mci: fix bad logic of sg_copy_{from,to}_buffer conversion
      48f8e8e9
  2. 30 8月, 2018 7 次提交
  3. 29 8月, 2018 5 次提交
  4. 28 8月, 2018 17 次提交
    • C
    • J
      nvme-fcloop: Fix dropped LS's to removed target port · afd299ca
      James Smart 提交于
      When a targetport is removed from the config, fcloop will avoid calling
      the LS done() routine thinking the targetport is gone. This leaves the
      initiator reset/reconnect hanging as it waits for a status on the
      Create_Association LS for the reconnect.
      
      Change the filter in the LS callback path. If tport null (set when
      failed validation before "sending to remote port"), be sure to call
      done. This was the main bug. But, continue the logic that only calls
      done if tport was set but there is no remoteport (e.g. case where
      remoteport has been removed, thus host doesn't expect a completion).
      Signed-off-by: NJames Smart <james.smart@broadcom.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      afd299ca
    • M
      nvme-pci: add a memory barrier to nvme_dbbuf_update_and_check_event · f1ed3df2
      Michal Wnukowski 提交于
      In many architectures loads may be reordered with older stores to
      different locations.  In the nvme driver the following two operations
      could be reordered:
      
       - Write shadow doorbell (dbbuf_db) into memory.
       - Read EventIdx (dbbuf_ei) from memory.
      
      This can result in a potential race condition between driver and VM host
      processing requests (if given virtual NVMe controller has a support for
      shadow doorbell).  If that occurs, then the NVMe controller may decide to
      wait for MMIO doorbell from guest operating system, and guest driver may
      decide not to issue MMIO doorbell on any of subsequent commands.
      
      This issue is purely timing-dependent one, so there is no easy way to
      reproduce it. Currently the easiest known approach is to run "Oracle IO
      Numbers" (orion) that is shipped with Oracle DB:
      
      orion -run advanced -num_large 0 -size_small 8 -type rand -simulate \
      	concat -write 40 -duration 120 -matrix row -testname nvme_test
      
      Where nvme_test is a .lun file that contains a list of NVMe block
      devices to run test against. Limiting number of vCPUs assigned to given
      VM instance seems to increase chances for this bug to occur. On test
      environment with VM that got 4 NVMe drives and 1 vCPU assigned the
      virtual NVMe controller hang could be observed within 10-20 minutes.
      That correspond to about 400-500k IO operations processed (or about
      100GB of IO read/writes).
      
      Orion tool was used as a validation and set to run in a loop for 36
      hours (equivalent of pushing 550M IO operations). No issues were
      observed. That suggest that the patch fixes the issue.
      
      Fixes: f9f38e33 ("nvme: improve performance for virtual NVMe devices")
      Signed-off-by: NMichal Wnukowski <wnukowski@google.com>
      Reviewed-by: NKeith Busch <keith.busch@intel.com>
      Reviewed-by: NSagi Grimberg <sagi@grimberg.me>
      [hch: updated changelog and comment a bit]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      f1ed3df2
    • J
      block: bsg: move atomic_t ref_count variable to refcount API · db193954
      John Pittman 提交于
      Currently, variable ref_count within the bsg_device struct is of
      type atomic_t.  For variables being used as reference counters,
      the refcount API should be used instead of atomic.  The newer
      refcount API works to prevent counter overflows and use-after-free
      bugs.  So, move this varable from the atomic API to refcount,
      potentially avoiding the issues mentioned.
      Signed-off-by: NJohn Pittman <jpittman@redhat.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      db193954
    • C
      block: remove unnecessary condition check · 62d2a194
      Chengguang Xu 提交于
      kmem_cache_destroy() can handle NULL pointer correctly, so there is
      no need to check e->icq_cache before calling kmem_cache_destroy().
      Signed-off-by: NChengguang Xu <cgxu519@gmx.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      62d2a194
    • L
      ata: ftide010: Add a quirk for SQ201 · 46cb52ad
      Linus Walleij 提交于
      The DMA is broken on this specific device for some unknown
      reason (probably badly designed or plain broken interface
      electronics) and will only work with PIO. Other users of
      the same hardware does not have this problem.
      
      Add a specific quirk so that this Gemini device gets
      DMA turned off. Also fix up some code around passing the
      port information around in probe while we're at it.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      46cb52ad
    • J
      blk-wbt: remove dead code · b0a84beb
      Jens Axboe 提交于
      We already note and mark discard and swap IO from bio_to_wbt_flags().
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      b0a84beb
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 050cdc6c
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) ICE, E1000, IGB, IXGBE, and I40E bug fixes from the Intel folks.
      
       2) Better fix for AB-BA deadlock in packet scheduler code, from Cong
          Wang.
      
       3) bpf sockmap fixes (zero sized key handling, etc.) from Daniel
          Borkmann.
      
       4) Send zero IPID in TCP resets and SYN-RECV state ACKs, to prevent
          attackers using it as a side-channel. From Eric Dumazet.
      
       5) Memory leak in mediatek bluetooth driver, from Gustavo A. R. Silva.
      
       6) Hook up rt->dst.input of ipv6 anycast routes properly, from Hangbin
          Liu.
      
       7) hns and hns3 bug fixes from Huazhong Tan.
      
       8) Fix RIF leak in mlxsw driver, from Ido Schimmel.
      
       9) iova range check fix in vhost, from Jason Wang.
      
      10) Fix hang in do_tcp_sendpages() with tls, from John Fastabend.
      
      11) More r8152 chips need to disable RX aggregation, from Kai-Heng Feng.
      
      12) Memory exposure in TCA_U32_SEL handling, from Kees Cook.
      
      13) TCP BBR congestion control fixes from Kevin Yang.
      
      14) hv_netvsc, ignore non-PCI devices, from Stephen Hemminger.
      
      15) qed driver fixes from Tomer Tayar.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (77 commits)
        net: sched: Fix memory exposure from short TCA_U32_SEL
        qed: fix spelling mistake "comparsion" -> "comparison"
        vhost: correctly check the iova range when waking virtqueue
        qlge: Fix netdev features configuration.
        net: macb: do not disable MDIO bus at open/close time
        Revert "net: stmmac: fix build failure due to missing COMMON_CLK dependency"
        net: macb: Fix regression breaking non-MDIO fixed-link PHYs
        mlxsw: spectrum_switchdev: Do not leak RIFs when removing bridge
        i40e: fix condition of WARN_ONCE for stat strings
        i40e: Fix for Tx timeouts when interface is brought up if DCB is enabled
        ixgbe: fix driver behaviour after issuing VFLR
        ixgbe: Prevent unsupported configurations with XDP
        ixgbe: Replace GFP_ATOMIC with GFP_KERNEL
        igb: Replace mdelay() with msleep() in igb_integrated_phy_loopback()
        igb: Replace GFP_ATOMIC with GFP_KERNEL in igb_sw_init()
        igb: Use an advanced ctx descriptor for launchtime
        e1000: ensure to free old tx/rx rings in set_ringparam()
        e1000: check on netif_running() before calling e1000_up()
        ixgb: use dma_zalloc_coherent instead of allocator/memset
        ice: Trivial formatting fixes
        ...
      050cdc6c
    • M
      mtd: rawnand: denali: do not pass zero maxchips to nand_scan() · 336d139f
      Masahiro Yamada 提交于
      Commit 49aa76b1 ("mtd: rawnand: do not execute nand_scan_ident()
      if maxchips is zero") gave a new meaning for calling nand_scan_ident()
      with maxchips=0.
      
      It is a special usage for some drivers such as docg4, but actually
      the Denali driver may pass maxchips=0 to nand_scan() when the driver
      is enabled but no NAND chip is found on the board for some reasons.
      
      If nand_scan_with_ids() is called with maxchips=0, nand_scan_ident()
      is skipped, then nand_set_defaults() is skipped as well.  Thus, the
      driver must set chip->controller beforehand.  Otherwise, nand_attach()
      causes NULL pointer dereference.
      
      In fact, the Denali controller knows the number of connected chips
      before calling nand_scan_ident(); if DEVICE_RESET fails, there is no
      chip in that chip select.  Then, denali_reset_banks() sets the maxchips
      to the number of detected chips.  If no chip is found, maxchips is zero.
      
      In this case, there is no point for calling nand_scan() because we know
      it will fail for sure.  Let's make the probe function fail immediately.
      
      Fixes: 49aa76b1 ("mtd: rawnand: do not execute nand_scan_ident() if maxchips is zero")
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: NMiquel Raynal <miquel.raynal@bootlin.com>
      Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
      336d139f
    • J
      Merge branch 'stable/for-jens-4.19' of... · 057d3ccf
      Jens Axboe 提交于
      Merge branch 'stable/for-jens-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-linus
      
      Pull Xen block driver fixes from Konrad:
      
      "Fix for flushing out persistent pages at a deterministic rate"
      
      * 'stable/for-jens-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen/blkback: remove unused pers_gnts_lock from struct xen_blkif_ring
        xen/blkback: move persistent grants flags to bool
        xen/blkfront: reorder tests in xlblk_init()
        xen/blkfront: cleanup stale persistent grants
        xen/blkback: don't keep persistent grants too long
      057d3ccf
    • J
      blk-wbt: improve waking of tasks · 38cfb5a4
      Jens Axboe 提交于
      We have two potential issues:
      
      1) After commit 2887e41b, we only wake one process at the time when
         we finish an IO. We really want to wake up as many tasks as can
         queue IO. Before this commit, we woke up everyone, which could cause
         a thundering herd issue.
      
      2) A task can potentially consume two wakeups, causing us to (in
         practice) miss a wakeup.
      
      Fix both by providing our own wakeup function, which stops
      __wake_up_common() from waking up more tasks if we fail to get a
      queueing token. With the strict ordering we have on the wait list, this
      wakes the right tasks and the right amount of tasks.
      
      Based on a patch from Jianchao Wang <jianchao.w.wang@oracle.com>.
      Tested-by: NAgarwal, Anchal <anchalag@amazon.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      38cfb5a4
    • J
      blk-wbt: abstract out end IO completion handler · 061a5427
      Jens Axboe 提交于
      Prep patch for calling the handler from a different context,
      no functional changes in this patch.
      Tested-by: NAgarwal, Anchal <anchalag@amazon.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      061a5427
    • J
      xen/blkback: remove unused pers_gnts_lock from struct xen_blkif_ring · 6f2f39ad
      Juergen Gross 提交于
      pers_gnts_lock isn't being used anywhere. Remove it.
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      Reviewed-by: NRoger Pau Monné <roger.pau@citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      6f2f39ad
    • J
      xen/blkback: move persistent grants flags to bool · d77ff24e
      Juergen Gross 提交于
      The struct persistent_gnt flags member is meant to be a bitfield of
      different flags. There is only PERSISTENT_GNT_ACTIVE flag left, so
      convert it to a bool named "active".
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      Reviewed-by: NRoger Pau Monné <roger.pau@citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      d77ff24e
    • J
      xen/blkfront: reorder tests in xlblk_init() · 4bcddbae
      Juergen Gross 提交于
      In case we don't want pv block devices we should not test parameters
      for sanity and eventually print out error messages. So test precluding
      conditions before checking parameters.
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      Reviewed-by: NRoger Pau Monné <roger.pau@citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      4bcddbae
    • J
      xen/blkfront: cleanup stale persistent grants · a46b5367
      Juergen Gross 提交于
      Add a periodic cleanup function to remove old persistent grants which
      are no longer in use on the backend side. This avoids starvation in
      case there are lots of persistent grants for a device which no longer
      is involved in I/O business.
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      Reviewed-by: NRoger Pau Monné <roger.pau@citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      a46b5367
    • J
      xen/blkback: don't keep persistent grants too long · 973e5405
      Juergen Gross 提交于
      Persistent grants are allocated until a threshold per ring is being
      reached. Those grants won't be freed until the ring is being destroyed
      meaning there will be resources kept busy which might no longer be
      used.
      
      Instead of freeing only persistent grants until the threshold is
      reached add a timestamp and remove all persistent grants not having
      been in use for a minute.
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      Reviewed-by: NRoger Pau Monné <roger.pau@citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      973e5405
  5. 27 8月, 2018 6 次提交