1. 19 5月, 2017 2 次提交
  2. 18 5月, 2017 11 次提交
  3. 17 5月, 2017 9 次提交
    • C
      dm cache: handle kmalloc failure allocating background_tracker struct · 7e1b9521
      Colin Ian King 提交于
      Currently there is no kmalloc failure check on the allocation of
      the background_tracker struct in btracker_create(), and so a NULL return
      will lead to a NULL pointer dereference.  Add a NULL check.
      
      Detected by CoverityScan, CID#1416587 ("Dereference null return value")
      
      Fixes: b29d4986 ("dm cache: significant rework to leverage dm-bio-prison-v2")
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      7e1b9521
    • A
      iommu/mediatek: Include linux/dma-mapping.h · 745b6e74
      Arnd Bergmann 提交于
      The mediatek iommu driver relied on an implicit include of dma-mapping.h,
      but for some reason that is no longer there in 4.12-rc1:
      
      drivers/iommu/mtk_iommu_v1.c: In function 'mtk_iommu_domain_finalise':
      drivers/iommu/mtk_iommu_v1.c:233:16: error: implicit declaration of function 'dma_zalloc_coherent'; did you mean 'debug_dma_alloc_coherent'? [-Werror=implicit-function-declaration]
      drivers/iommu/mtk_iommu_v1.c: In function 'mtk_iommu_domain_free':
      drivers/iommu/mtk_iommu_v1.c:265:2: error: implicit declaration of function 'dma_free_coherent'; did you mean 'debug_dma_free_coherent'? [-Werror=implicit-function-declaration]
      
      This adds an explicit #include to make it build again.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 208480bb ('iommu: Remove trace-events include from iommu.h')
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      745b6e74
    • K
      iommu/vt-d: Flush the IOTLB to get rid of the initial kdump mappings · f73a7eee
      KarimAllah Ahmed 提交于
      Ever since commit 091d42e4 ("iommu/vt-d: Copy translation tables from
      old kernel") the kdump kernel copies the IOMMU context tables from the
      previous kernel. Each device mappings will be destroyed once the driver
      for the respective device takes over.
      
      This unfortunately breaks the workflow of mapping and unmapping a new
      context to the IOMMU. The mapping function assumes that either:
      
      1) Unmapping did the proper IOMMU flushing and it only ever flush if the
         IOMMU unit supports caching invalid entries.
      2) The system just booted and the initialization code took care of
         flushing all IOMMU caches.
      
      This assumption is not true for the kdump kernel since the context
      tables have been copied from the previous kernel and translations could
      have been cached ever since. So make sure to flush the IOTLB as well
      when we destroy these old copied mappings.
      
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: David Woodhouse <dwmw@amazon.co.uk>
      Cc: Anthony Liguori <aliguori@amazon.com>
      Signed-off-by: NKarimAllah Ahmed <karahmed@amazon.de>
      Acked-by: NDavid Woodhouse <dwmw@amazon.co.uk>
      Cc: stable@vger.kernel.org  v4.2+
      Fixes: 091d42e4 ("iommu/vt-d: Copy translation tables from old kernel")
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      f73a7eee
    • R
      iommu/dma: Don't touch invalid iova_domain members · 1cc896ed
      Robin Murphy 提交于
      When __iommu_dma_map() and iommu_dma_free_iova() are called from
      iommu_dma_get_msi_page(), various iova_*() helpers are still invoked in
      the process, whcih is unwise since they access a different member of the
      union (the iova_domain) from that which was last written, and there's no
      guarantee that sensible values will result anyway.
      
      CLean up the code paths that are valid for an MSI cookie to ensure we
      only do iova_domain-specific things when we're actually dealing with one.
      
      Fixes: a44e6657 ("iommu/dma: Clean up MSI IOVA allocation")
      Reported-by: NNate Watterson <nwatters@codeaurora.org>
      Tested-by: NShanker Donthineni <shankerd@codeaurora.org>
      Tested-by: NBharat Bhushan <bharat.bhushan@nxp.com>
      Signed-off-by: NRobin Murphy <robin.murphy@arm.com>
      Tested-by: NEric Auger <eric.auger@redhat.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      1cc896ed
    • T
      i2c: xgene: Set ACPI_COMPANION_I2C · 83345d51
      Tin Huynh 提交于
      With ACPI, i2c-core requires ACPI companion to be set in order for it
      to create slave device.
      This patch sets the ACPI companion accordingly.
      Signed-off-by: NTin Huynh <tnhuynh@apm.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      83345d51
    • T
      i2c: mv64xxx: don't override deferred probing when getting irq · 88ad60c2
      Thomas Petazzoni 提交于
      There is no reason to use platform_get_irq() for non-DT probing and
      irq_of_parse_and_map() for DT probing. Indeed, platform_get_irq()
      works fine for both.
      
      In addition, using platform_get_irq() properly returns -EPROBE_DEFER
      when the interrupt controller is not yet available, so instead of
      inventing our own error code (-ENXIO), return the one provided by
      platform_get_irq().
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      88ad60c2
    • A
      mlx5e: add CONFIG_INET dependency · 2432a3fb
      Arnd Bergmann 提交于
      We now reference the arp_tbl, which requires IPv4 support to be
      enabled in the kernel, otherwise we get a link error:
      
      drivers/net/built-in.o: In function `mlx5e_tc_update_neigh_used_value':
      (.text+0x16afec): undefined reference to `arp_tbl'
      drivers/net/built-in.o: In function `mlx5e_rep_neigh_init':
      en_rep.c:(.text+0x16c16d): undefined reference to `arp_tbl'
      drivers/net/built-in.o: In function `mlx5e_rep_netevent_event':
      en_rep.c:(.text+0x16cbb5): undefined reference to `arp_tbl'
      
      This adds a Kconfig dependency for it.
      
      Fixes: 232c0013 ("net/mlx5e: Add support to neighbour update flow")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2432a3fb
    • M
      dm bufio: make the parameter "retain_bytes" unsigned long · 13840d38
      Mikulas Patocka 提交于
      Change the type of the parameter "retain_bytes" from unsigned to
      unsigned long, so that on 64-bit machines the user can set more than
      4GiB of data to be retained.
      
      Also, change the type of the variable "count" in the function
      "__evict_old_buffers" to unsigned long.  The assignment
      "count = c->n_buffers[LIST_CLEAN] + c->n_buffers[LIST_DIRTY];"
      could result in unsigned long to unsigned overflow and that could result
      in buffers not being freed when they should.
      
      While at it, avoid division in get_retain_buffers().  Division is slow,
      we can change it to shift because we have precalculated the log2 of
      block size.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      13840d38
    • K
      efi-pstore: Fix read iter after pstore API refactor · 6f61dd3a
      Kees Cook 提交于
      During the internal pstore API refactoring, the EFI vars read entry was
      accidentally made to update a stack variable instead of the pstore
      private data pointer. This corrects the problem (and removes the now
      needless argument).
      
      Fixes: 125cc42b ("pstore: Replace arguments for read() API")
      Signed-off-by: NKees Cook <keescook@chromium.org>
      6f61dd3a
  4. 16 5月, 2017 16 次提交
  5. 15 5月, 2017 2 次提交