1. 04 Aug, 2014 7 commits
    • Linus Torvalds's avatar
      Merge branch 'for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · 47dfe403
      Linus Torvalds authored
      Pull cgroup changes from Tejun Heo:
       "Mostly changes to get the v2 interface ready.  The core features are
        mostly ready now and I think it's reasonable to expect to drop the
        devel mask in one or two devel cycles at least for a subset of
        controllers.
      
         - cgroup added a controller dependency mechanism so that block cgroup
           can depend on memory cgroup.  This will be used to finally support
           IO provisioning on the writeback traffic, which is currently being
           implemented.
      
         - The v2 interface now uses a separate table so that the interface
           files for the new interface are explicitly declared in one place.
           Each controller will explicitly review and add the files for the
           new interface.
      
         - cpuset is getting ready for the hierarchical behavior which is in
           the similar style with other controllers so that an ancestor's
           configuration change doesn't change the descendants' configurations
           irreversibly and processes aren't silently migrated when a CPU or
           node goes down.
      
        All the changes are to the new interface and no behavior changed for
        the multiple hierarchies"
      
      * 'for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (29 commits)
        cpuset: fix the WARN_ON() in update_nodemasks_hier()
        cgroup: initialize cgrp_dfl_root_inhibit_ss_mask from !->dfl_files test
        cgroup: make CFTYPE_ONLY_ON_DFL and CFTYPE_NO_ internal to cgroup core
        cgroup: distinguish the default and legacy hierarchies when handling cftypes
        cgroup: replace cgroup_add_cftypes() with cgroup_add_legacy_cftypes()
        cgroup: rename cgroup_subsys->base_cftypes to ->legacy_cftypes
        cgroup: split cgroup_base_files[] into cgroup_{dfl|legacy}_base_files[]
        cpuset: export effective masks to userspace
        cpuset: allow writing offlined masks to cpuset.cpus/mems
        cpuset: enable onlined cpu/node in effective masks
        cpuset: refactor cpuset_hotplug_update_tasks()
        cpuset: make cs->{cpus, mems}_allowed as user-configured masks
        cpuset: apply cs->effective_{cpus,mems}
        cpuset: initialize top_cpuset's configured masks at mount
        cpuset: use effective cpumask to build sched domains
        cpuset: inherit ancestor's masks if effective_{cpus, mems} becomes empty
        cpuset: update cs->effective_{cpus, mems} when config changes
        cpuset: update cpuset->effective_{cpus,mems} at hotplug
        cpuset: add cs->effective_cpus and cs->effective_mems
        cgroup: clean up sane_behavior handling
        ...
      47dfe403
    • Linus Torvalds's avatar
      Merge branch 'for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu · f2a84170
      Linus Torvalds authored
      Pull percpu updates from Tejun Heo:
      
       - Major reorganization of percpu header files which I think makes
         things a lot more readable and logical than before.
      
       - percpu-refcount is updated so that it requires explicit destruction
         and can be reinitialized if necessary.  This was pulled into the
         block tree to replace the custom percpu refcnting implemented in
         blk-mq.
      
       - In the process, percpu and percpu-refcount got cleaned up a bit
      
      * 'for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (21 commits)
        percpu-refcount: implement percpu_ref_reinit() and percpu_ref_is_zero()
        percpu-refcount: require percpu_ref to be exited explicitly
        percpu-refcount: use unsigned long for pcpu_count pointer
        percpu-refcount: add helpers for ->percpu_count accesses
        percpu-refcount: one bit is enough for REF_STATUS
        percpu-refcount, aio: use percpu_ref_cancel_init() in ioctx_alloc()
        workqueue: stronger test in process_one_work()
        workqueue: clear POOL_DISASSOCIATED in rebind_workers()
        percpu: Use ALIGN macro instead of hand coding alignment calculation
        percpu: invoke __verify_pcpu_ptr() from the generic part of accessors and operations
        percpu: preffity percpu header files
        percpu: use raw_cpu_*() to define __this_cpu_*()
        percpu: reorder macros in percpu header files
        percpu: move {raw|this}_cpu_*() definitions to include/linux/percpu-defs.h
        percpu: move generic {raw|this}_cpu_*_N() definitions to include/asm-generic/percpu.h
        percpu: only allow sized arch overrides for {raw|this}_cpu_*() ops
        percpu: reorganize include/linux/percpu-defs.h
        percpu: move accessors from include/linux/percpu.h to percpu-defs.h
        percpu: include/asm-generic/percpu.h should contain only arch-overridable parts
        percpu: introduce arch_raw_cpu_ptr()
        ...
      f2a84170
    • Linus Torvalds's avatar
      Merge branch 'for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq · c4c3f5fb
      Linus Torvalds authored
      Pull workqueue updates from Tejun Heo:
       "Lai has been doing a lot of cleanups of workqueue and kthread_work.
        No significant behavior change.  Just a lot of cleanups all over the
        place.  Some are a bit invasive but overall nothing too dangerous"
      
      * 'for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
        kthread_work: remove the unused wait_queue_head
        kthread_work: wake up worker only when the worker is idle
        workqueue: use nr_node_ids instead of wq_numa_tbl_len
        workqueue: remove the misnamed out_unlock label in get_unbound_pool()
        workqueue: remove the stale comment in pwq_unbound_release_workfn()
        workqueue: move rescuer pool detachment to the end
        workqueue: unfold start_worker() into create_worker()
        workqueue: remove @wakeup from worker_set_flags()
        workqueue: remove an unneeded UNBOUND test before waking up the next worker
        workqueue: wake regular worker if need_more_worker() when rescuer leave the pool
        workqueue: alloc struct worker on its local node
        workqueue: reuse the already calculated pwq in try_to_grab_pending()
        workqueue: stronger test in process_one_work()
        workqueue: clear POOL_DISASSOCIATED in rebind_workers()
        workqueue: sanity check pool->cpu in wq_worker_sleeping()
        workqueue: clear leftover flags when detached
        workqueue: remove useless WARN_ON_ONCE()
        workqueue: use schedule_timeout_interruptible() instead of open code
        workqueue: remove the empty check in too_many_workers()
        workqueue: use "pool->cpu < 0" to stand for an unbound pool
      c4c3f5fb
    • Linus Torvalds's avatar
      Merge tag 'locks-v3.17-1' of git://git.samba.org/jlayton/linux · 1bff5988
      Linus Torvalds authored
      Pull file locking related changes from Jeff Layton:
       "Just a couple of changes from Christoph to start us down the road
        toward getting rid of the fl_owner_t typedef"
      
      * tag 'locks-v3.17-1' of git://git.samba.org/jlayton/linux:
        locks: purge fl_owner_t from fs/locks.c
        locks: typedef fl_owner_t to void *
      1bff5988
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 3e7a716a
      Linus Torvalds authored
      Pull crypto update from Herbert Xu:
       - CTR(AES) optimisation on x86_64 using "by8" AVX.
       - arm64 support to ccp
       - Intel QAT crypto driver
       - Qualcomm crypto engine driver
       - x86-64 assembly optimisation for 3DES
       - CTR(3DES) speed test
       - move FIPS panic from module.c so that it only triggers on crypto
         modules
       - SP800-90A Deterministic Random Bit Generator (drbg).
       - more test vectors for ghash.
       - tweak self tests to catch partial block bugs.
       - misc fixes.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (94 commits)
        crypto: drbg - fix failure of generating multiple of 2**16 bytes
        crypto: ccp - Do not sign extend input data to CCP
        crypto: testmgr - add missing spaces to drbg error strings
        crypto: atmel-tdes - Switch to managed version of kzalloc
        crypto: atmel-sha - Switch to managed version of kzalloc
        crypto: testmgr - use chunks smaller than algo block size in chunk tests
        crypto: qat - Fixed SKU1 dev issue
        crypto: qat - Use hweight for bit counting
        crypto: qat - Updated print outputs
        crypto: qat - change ae_num to ae_id
        crypto: qat - change slice->regions to slice->region
        crypto: qat - use min_t macro
        crypto: qat - remove unnecessary parentheses
        crypto: qat - remove unneeded header
        crypto: qat - checkpatch blank lines
        crypto: qat - remove unnecessary return codes
        crypto: Resolve shadow warnings
        crypto: ccp - Remove "select OF" from Kconfig
        crypto: caam - fix DECO RSR polling
        crypto: qce - Let 'DEV_QCE' depend on both HAS_DMA and HAS_IOMEM
        ...
      3e7a716a
    • Linus Torvalds's avatar
      Merge tag 'edac_for_3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp · c2df436b
      Linus Torvalds authored
      Pull EDAC changes from Borislav Petkov:
       "EDAC queue for 3.17:
      
         - One new edac driver for Intel E3-12xx DRAM controllers.
      
         - Out-of-subsystem changes are making the non-atomic iomem 64-bit
           accessors' naming explicit to show both exact order of the 32-bit
           accesses and the non-atomicity of the 64-bit access.
      
           Usage locations are more verbose now as to what access is exactly
           being done vs having a not-very telling "readq" there, for example.
      
           This is needed by E3-12xx hardware where certain mmapped registers
           cannot be accessed with requests crossing a dword boundary.
      
           From Jason Baron.
      
         - Extending AMD MCE signatures to a new model 60h in family 15h, from
           Aravind Gopalakrishnan.
      
         - An unsigned check cleanup, from Fabian Frederick"
      
      * tag 'edac_for_3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
        EDAC, MCE, AMD: Add MCE decoding for F15h M60h
        MAINTAINERS: add ie31200_edac entry
        ie31200_edac: Allocate mci and map mchbar first
        ie31200_edac: Introduce the driver
        x38_edac: make use of lo_hi_readq()
        readq/writeq: Add explicit lo_hi_[read|write]_q and hi_lo_[read|write]_q
        EDAC, edac_module.c: Remove unnecessary test on unsigned value
      c2df436b
    • Linus Torvalds's avatar
      Merge tag 'pci-v3.17-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · f74ad8df
      Linus Torvalds authored
      Pull PCI updates from Bjorn Helgaas:
       "I'll be on vacation until Aug 11, and I suspect the merge window will
        open before then, so I'm sending this to you early.  There are more
        things I'd like to get into v3.17, so I hope to send another pull
        request soon after I return.
      
        The most notable pieces here are:
      
         - Support BARs up to 128GB (up from 8GB)
         - Fix SR-IOV resource assignment when we fail to expand a resource
         - Rework pciehp to handle a common hardware erratum
         - Cleanup MSI
         - Fix NIC renaming issue
         - Fix VGA default device issue on EFI systems
         - Fix ASPM configuration (previously we didn't enable it as expected)
      
        Alex Williamson has graciously agreed to take care of any major issues
        with this if you take it before I return.
      
        Details:
      
        Resource management
          - Support BAR sizes up to 128GB (Yinghai Lu)
          - Keep original resource if we fail to expand it (Guo Chao)
          - Return conventional error values from pci_revert_fw_address() (Bjorn Helgaas)
          - Tidy resource assignment messages (Bjorn Helgaas)
          - Don't exclude low BIOS area for non-PCI cards (Christoph Schulz)
      
        PCI device hotplug
          - Prevent NULL dereference during pciehp probe (Andreas Noever)
          - Make pciehp pcie_wait_cmd() self-contained (Bjorn Helgaas)
          - Wait for pciehp hotplug command completion lazily (Bjorn Helgaas)
          - Compute pciehp timeout from hotplug command start time (Bjorn Helgaas)
          - Remove pciehp assumptions about which commands cause completion events (Bjorn Helgaas)
          - Clear pciehp Data Link Layer State Changed during init (Myron Stowe)
          - Remove pciehp struct controller.no_cmd_complete (Rajat Jain)
          - Remove cpqphp unnecessary null test (Fabian Frederick)
          - Remove "invalid IRQ" warning for hot-added PCIe ports (Jiang Liu)
      
        IOMMU
          - Add DMA alias quirk for Intel 82801 bridge (Alex Williamson)
      
        MSI
          - Add internal msix_clear_and_set_ctrl() (Yijing Wang)
          - Remove unused msi_enabled_mask() (Yijing Wang)
          - Cache Multiple Message Capable in struct msi_desc (Yijing Wang)
          - Add msi_setup_entry() to clean up initialization (Yijing Wang)
          - Remove unused msi_remove_pci_irq_vectors() (Yijing Wang)
          - Retrieve first MSI IRQ from msi_desc rather than pci_dev (Yijing Wang)
          - Remove unused list access in __pci_restore_msix_state() (Yijing Wang)
          - Use irq_get_msi_desc() to simplify code (Yijing Wang)
      
        Generic host bridge driver
          - Fix GPL v2 license string typo (Bjorn Helgaas)
      
        Marvell MVEBU
          - Fix GPL v2 license string typo (Thierry Reding)
      
        NVIDIA Tegra
          - Use correct initial HW settings (Phil Edworthy)
          - Remove rcar_pcie_setup_window() resource argument (Phil Edworthy)
          - Fix GPL v2 license string typo (Thierry Reding)
      
        Renesas R-Car
          - Remove redundant config accessor register checks (Sergei Shtylyov)
          - Fix GPL v2 license string typo (Bjorn Helgaas)
      
        Virtualization
          - Factor secondary bus reset logic (Gavin Shan)
          - Remove duplicate powerpc reset logic (Gavin Shan)
      
        Miscellaneous
          - Rework default VGA detection for EFI (Bruno Prémont)
          - Fix sysfs "acpi_index" and "label" errors for NIC renaming (Simone Gotti)
          - Configure ASPM at pci_enable_device()-time (Vidya Sagar)
          - Add include/linux/pci_ids.h include guard (Rasmus Villemoes)"
      
      * tag 'pci-v3.17-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (38 commits)
        PCI/MSI: Use irq_get_msi_desc() to simplify code
        PCI/MSI: Remove unused list access in __pci_restore_msix_state()
        PCI/MSI: Retrieve first MSI IRQ from msi_desc rather than pci_dev
        PCI/MSI: Remove unused function msi_remove_pci_irq_vectors()
        PCI/MSI: Add msi_setup_entry() to clean up MSI initialization
        PCI: Configure ASPM when enabling device
        x86: don't exclude low BIOS area when allocating address space for non-PCI cards
        PCI: generic: Fix GPL v2 license string typo
        PCI: rcar: Fix GPL v2 license string typo
        PCI: tegra: Fix GPL v2 license string typo
        PCI: mvebu: Fix GPL v2 license string typo
        PCI: Add include guard to include/linux/pci_ids.h
        x86, ia64: Move EFI_FB vga_default_device() initialization to pci_vga_fixup()
        PCI: Tidy resource assignment messages
        PCI: Return conventional error values from pci_revert_fw_address()
        PCI: Cleanup control flow
        PCI: Support BAR sizes up to 128GB
        PCI: cpqphp: Remove unnecessary null test before debugfs_remove()
        PCI: pciehp: Clear Data Link Layer State Changed during init
        PCI: Add bridge DMA alias quirk for Intel 82801 bridge
        ...
      f74ad8df
  2. 03 Aug, 2014 2 commits
  3. 02 Aug, 2014 6 commits
  4. 01 Aug, 2014 24 commits
    • Linus Torvalds's avatar
      Merge tag 'dm-3.16-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm · 818be589
      Linus Torvalds authored
      Pull device mapper fixes from Mike Snitzer:
       "Fix dm bufio shrinker to properly zero-fill all fields.
      
        Fix race in dm cache that caused improper reporting of the number of
        dirty blocks in the cache"
      
      * tag 'dm-3.16-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm cache: fix race affecting dirty block count
        dm bufio: fully initialize shrinker
      818be589
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 9642a104
      Linus Torvalds authored
      Pull ARM straggler SoC fix from Olof Johansson:
       "A DT bugfix for Nomadik that had an ambigouos double-inversion of a
        gpio line, and one MAINTAINER URL update that might as well go in now.
      
        We could hold off until the merge window, but then we'll just have to
        mark the DT fix for stable and it just seems like in total causing
        more work"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        MAINTAINERS: Update Tegra Git URL
        ARM: nomadik: fix up double inversion in DT
      9642a104
    • Anssi Hannula's avatar
      dm cache: fix race affecting dirty block count · 44fa816b
      Anssi Hannula authored
      nr_dirty is updated without locking, causing it to drift so that it is
      non-zero (either a small positive integer, or a very large one when an
      underflow occurs) even when there are no actual dirty blocks.  This was
      due to a race between the workqueue and map function accessing nr_dirty
      in parallel without proper protection.
      
      People were seeing under runs due to a race on increment/decrement of
      nr_dirty, see: https://lkml.org/lkml/2014/6/3/648
      
      Fix this by using an atomic_t for nr_dirty.
      
      Reported-by: roma1390@gmail.com
      Signed-off-by: default avatarAnssi Hannula <anssi.hannula@iki.fi>
      Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Cc: stable@vger.kernel.org
      44fa816b
    • Greg Thelen's avatar
      dm bufio: fully initialize shrinker · d8c712ea
      Greg Thelen authored
      1d3d4437 ("vmscan: per-node deferred work") added a flags field to
      struct shrinker assuming that all shrinkers were zero filled.  The dm
      bufio shrinker is not zero filled, which leaves arbitrary kmalloc() data
      in flags.  So far the only defined flags bit is SHRINKER_NUMA_AWARE.
      But there are proposed patches which add other bits to shrinker.flags
      (e.g. memcg awareness).
      
      Rather than simply initializing the shrinker, this patch uses kzalloc()
      when allocating the dm_bufio_client to ensure that the embedded shrinker
      and any other similar structures are zeroed.
      
      This fixes theoretical over aggressive shrinking of dm bufio objects.
      If the uninitialized dm_bufio_client.shrinker.flags contains
      SHRINKER_NUMA_AWARE then shrink_slab() would call the dm shrinker for
      each numa node rather than just once.  This has been broken since 3.12.
      Signed-off-by: default avatarGreg Thelen <gthelen@google.com>
      Acked-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Cc: stable@vger.kernel.org # v3.12+
      d8c712ea
    • Stephan Mueller's avatar
      crypto: drbg - fix failure of generating multiple of 2**16 bytes · ce5481d0
      Stephan Mueller authored
      The function drbg_generate_long slices the request into 2**16 byte
      or smaller chunks. However, the loop, however invokes the random number
      generation function with zero bytes when the request size is a multiple
      of 2**16 bytes. The fix prevents zero bytes requests.
      Signed-off-by: default avatarStephan Mueller <smueller@chronox.de>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      ce5481d0
    • Tom Lendacky's avatar
      crypto: ccp - Do not sign extend input data to CCP · 63917232
      Tom Lendacky authored
      The CCP hardware interprets all numbers as unsigned numbers, therefore
      sign extending input data is not valid.  Modify the function calls
      for RSA and ECC to not perform sign extending.
      
      This patch is based on the cryptodev-2.6 kernel tree.
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      63917232
    • Jarod Wilson's avatar
      crypto: testmgr - add missing spaces to drbg error strings · 2fc0d258
      Jarod Wilson authored
      There are a few missing spaces in the error text strings for
      drbg_cavs_test, trivial fix.
      
      CC: "David S. Miller" <davem@davemloft.net>
      CC: linux-crypto@vger.kernel.org
      Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
      Acked-by: default avatarStephan Mueller <smueller@chronox.de>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      2fc0d258
    • Pramod Gurav's avatar
      crypto: atmel-tdes - Switch to managed version of kzalloc · c659d07f
      Pramod Gurav authored
      This patch switches data allocation from kzalloc to devm_kzalloc.
      It also removes some kfree() on data that was earlier allocated
      using devm_kzalloc() from probe as well as remove funtions.
      
      CC: Herbert Xu <herbert@gondor.apana.org.au>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Grant Likely <grant.likely@linaro.org>
      CC: Rob Herring <robh+dt@kernel.org>
      Signed-off-by: default avatarPramod Gurav <pramod.gurav@smartplayin.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      c659d07f
    • Pramod Gurav's avatar
      crypto: atmel-sha - Switch to managed version of kzalloc · 593901aa
      Pramod Gurav authored
      This patch switches data allocation from kzalloc to devm_kzalloc.
      It also removed some kfree() on data that was earlier allocated
      using devm_kzalloc().
      
      CC: Herbert Xu <herbert@gondor.apana.org.au>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Grant Likely <grant.likely@linaro.org>
      CC: Rob Herring <robh+dt@kernel.org>
      CC: Nicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarPramod Gurav <pramod.gurav@smartplayin.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      593901aa
    • Ard Biesheuvel's avatar
      crypto: testmgr - use chunks smaller than algo block size in chunk tests · 3b9b8fe0
      Ard Biesheuvel authored
      This patch updates many of the chunked tcrypt test cases so that not all of the
      chunks are an exact multiple of the block size. This should help uncover cases
      where the residue passed to blkcipher_walk_done() is incorrect.
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      3b9b8fe0
    • Tadeusz Struk's avatar
      crypto: qat - Fixed SKU1 dev issue · 4f74c398
      Tadeusz Struk authored
      Fix for issue with SKU1 device.
      SKU1 device has 8 micro engines as opposed to 12 in other SKUs
      so it was not possible to start the non-existing micro engines.
      Signed-off-by: default avatarBo Cui <bo.cui@intel.com>
      Signed-off-by: default avatarTadeusz Struk <tadeusz.struk@intel.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      4f74c398
    • Tadeusz Struk's avatar
      crypto: qat - Use hweight for bit counting · d9a44abf
      Tadeusz Struk authored
      Use predefined hweight32 function instead of writing a new one.
      Signed-off-by: default avatarPingchao Yang <pingchao.yang@intel.com>
      Signed-off-by: default avatarTadeusz Struk <tadeusz.struk@intel.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      d9a44abf
    • Tadeusz Struk's avatar
      crypto: qat - Updated print outputs · 68991721
      Tadeusz Struk authored
      Updated pr_err output to make it more consistent.
      Signed-off-by: default avatarPingchao Yang <pingchao.yang@intel.com>
      Signed-off-by: default avatarTadeusz Struk <tadeusz.struk@intel.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      68991721
    • Tadeusz Struk's avatar
      crypto: qat - change ae_num to ae_id · 9a147cb3
      Tadeusz Struk authored
      Change the logic how acceleration engines are indexed to make it
      easier to read. Aslo some return code values updates to better reflect
      what failed.
      Signed-off-by: default avatarPingchao Yang <pingchao.yang@intel.com>
      Signed-off-by: default avatarTadeusz Struk <tadeusz.struk@intel.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      9a147cb3
    • Tadeusz Struk's avatar
      crypto: qat - change slice->regions to slice->region · 8c1f8e3b
      Tadeusz Struk authored
      Change ptr name slice->regions to slice->region to reflect the same
      in the page struct.
      Signed-off-by: default avatarPingchao Yang <pingchao.yang@intel.com>
      Signed-off-by: default avatarTadeusz Struk <tadeusz.struk@intel.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      8c1f8e3b
    • Tadeusz Struk's avatar
      crypto: qat - use min_t macro · df0088f5
      Tadeusz Struk authored
      prefer min_t() macro over two open-coded logical tests
      Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
      Signed-off-by: default avatarTadeusz Struk <tadeusz.struk@intel.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      df0088f5
    • Tadeusz Struk's avatar
      crypto: qat - remove unnecessary parentheses · 45cff260
      Tadeusz Struk authored
      Resolve new strict checkpatch hits
      CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around ...
      Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
      Signed-off-by: default avatarTadeusz Struk <tadeusz.struk@intel.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      45cff260
    • Tadeusz Struk's avatar
      crypto: qat - remove unneeded header · a7d21761
      Tadeusz Struk authored
      Remove include of a no longer necessary header file.
      Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
      Signed-off-by: default avatarTadeusz Struk <tadeusz.struk@intel.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      a7d21761
    • Tadeusz Struk's avatar
      crypto: qat - checkpatch blank lines · 53275baa
      Tadeusz Struk authored
      Fix new checkpatch hits:
      CHECK:LINE_SPACING: Please use a blank line after
      function/struct/union/enum declarations
      Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
      Signed-off-by: default avatarTadeusz Struk <tadeusz.struk@intel.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      53275baa
    • Tadeusz Struk's avatar
      crypto: qat - remove unnecessary return codes · 341b2a35
      Tadeusz Struk authored
      Remove unnecessary return code variables and change function types
      accordingly.
      Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
      Signed-off-by: default avatarTadeusz Struk <tadeusz.struk@intel.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      341b2a35
    • Mark Rustad's avatar
      crypto: Resolve shadow warnings · 3e3dc25f
      Mark Rustad authored
      Change formal parameters to not clash with global names to
      eliminate many W=2 warnings.
      Signed-off-by: default avatarMark Rustad <mark.d.rustad@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      3e3dc25f
    • Jan Kara's avatar
      timer: Fix lock inversion between hrtimer_bases.lock and scheduler locks · 504d5874
      Jan Kara authored
      clockevents_increase_min_delta() calls printk() from under
      hrtimer_bases.lock. That causes lock inversion on scheduler locks because
      printk() can call into the scheduler. Lockdep puts it as:
      
      ======================================================
      [ INFO: possible circular locking dependency detected ]
      3.15.0-rc8-06195-g939f04be #2 Not tainted
      -------------------------------------------------------
      trinity-main/74 is trying to acquire lock:
       (&port_lock_key){-.....}, at: [<811c60be>] serial8250_console_write+0x8c/0x10c
      
      but task is already holding lock:
       (hrtimer_bases.lock){-.-...}, at: [<8103caeb>] hrtimer_try_to_cancel+0x13/0x66
      
      which lock already depends on the new lock.
      
      the existing dependency chain (in reverse order) is:
      
      -> #5 (hrtimer_bases.lock){-.-...}:
             [<8104a942>] lock_acquire+0x92/0x101
             [<8142f11d>] _raw_spin_lock_irqsave+0x2e/0x3e
             [<8103c918>] __hrtimer_start_range_ns+0x1c/0x197
             [<8107ec20>] perf_swevent_start_hrtimer.part.41+0x7a/0x85
             [<81080792>] task_clock_event_start+0x3a/0x3f
             [<810807a4>] task_clock_event_add+0xd/0x14
             [<8108259a>] event_sched_in+0xb6/0x17a
             [<810826a2>] group_sched_in+0x44/0x122
             [<81082885>] ctx_sched_in.isra.67+0x105/0x11f
             [<810828e6>] perf_event_sched_in.isra.70+0x47/0x4b
             [<81082bf6>] __perf_install_in_context+0x8b/0xa3
             [<8107eb8e>] remote_function+0x12/0x2a
             [<8105f5af>] smp_call_function_single+0x2d/0x53
             [<8107e17d>] task_function_call+0x30/0x36
             [<8107fb82>] perf_install_in_context+0x87/0xbb
             [<810852c9>] SYSC_perf_event_open+0x5c6/0x701
             [<810856f9>] SyS_perf_event_open+0x17/0x19
             [<8142f8ee>] syscall_call+0x7/0xb
      
      -> #4 (&ctx->lock){......}:
             [<8104a942>] lock_acquire+0x92/0x101
             [<8142f04c>] _raw_spin_lock+0x21/0x30
             [<81081df3>] __perf_event_task_sched_out+0x1dc/0x34f
             [<8142cacc>] __schedule+0x4c6/0x4cb
             [<8142cae0>] schedule+0xf/0x11
             [<8142f9a6>] work_resched+0x5/0x30
      
      -> #3 (&rq->lock){-.-.-.}:
             [<8104a942>] lock_acquire+0x92/0x101
             [<8142f04c>] _raw_spin_lock+0x21/0x30
             [<81040873>] __task_rq_lock+0x33/0x3a
             [<8104184c>] wake_up_new_task+0x25/0xc2
             [<8102474b>] do_fork+0x15c/0x2a0
             [<810248a9>] kernel_thread+0x1a/0x1f
             [<814232a2>] rest_init+0x1a/0x10e
             [<817af949>] start_kernel+0x303/0x308
             [<817af2ab>] i386_start_kernel+0x79/0x7d
      
      -> #2 (&p->pi_lock){-.-...}:
             [<8104a942>] lock_acquire+0x92/0x101
             [<8142f11d>] _raw_spin_lock_irqsave+0x2e/0x3e
             [<810413dd>] try_to_wake_up+0x1d/0xd6
             [<810414cd>] default_wake_function+0xb/0xd
             [<810461f3>] __wake_up_common+0x39/0x59
             [<81046346>] __wake_up+0x29/0x3b
             [<811b8733>] tty_wakeup+0x49/0x51
             [<811c3568>] uart_write_wakeup+0x17/0x19
             [<811c5dc1>] serial8250_tx_chars+0xbc/0xfb
             [<811c5f28>] serial8250_handle_irq+0x54/0x6a
             [<811c5f57>] serial8250_default_handle_irq+0x19/0x1c
             [<811c56d8>] serial8250_interrupt+0x38/0x9e
             [<810510e7>] handle_irq_event_percpu+0x5f/0x1e2
             [<81051296>] handle_irq_event+0x2c/0x43
             [<81052cee>] handle_level_irq+0x57/0x80
             [<81002a72>] handle_irq+0x46/0x5c
             [<810027df>] do_IRQ+0x32/0x89
             [<8143036e>] common_interrupt+0x2e/0x33
             [<8142f23c>] _raw_spin_unlock_irqrestore+0x3f/0x49
             [<811c25a4>] uart_start+0x2d/0x32
             [<811c2c04>] uart_write+0xc7/0xd6
             [<811bc6f6>] n_tty_write+0xb8/0x35e
             [<811b9beb>] tty_write+0x163/0x1e4
             [<811b9cd9>] redirected_tty_write+0x6d/0x75
             [<810b6ed6>] vfs_write+0x75/0xb0
             [<810b7265>] SyS_write+0x44/0x77
             [<8142f8ee>] syscall_call+0x7/0xb
      
      -> #1 (&tty->write_wait){-.....}:
             [<8104a942>] lock_acquire+0x92/0x101
             [<8142f11d>] _raw_spin_lock_irqsave+0x2e/0x3e
             [<81046332>] __wake_up+0x15/0x3b
             [<811b8733>] tty_wakeup+0x49/0x51
             [<811c3568>] uart_write_wakeup+0x17/0x19
             [<811c5dc1>] serial8250_tx_chars+0xbc/0xfb
             [<811c5f28>] serial8250_handle_irq+0x54/0x6a
             [<811c5f57>] serial8250_default_handle_irq+0x19/0x1c
             [<811c56d8>] serial8250_interrupt+0x38/0x9e
             [<810510e7>] handle_irq_event_percpu+0x5f/0x1e2
             [<81051296>] handle_irq_event+0x2c/0x43
             [<81052cee>] handle_level_irq+0x57/0x80
             [<81002a72>] handle_irq+0x46/0x5c
             [<810027df>] do_IRQ+0x32/0x89
             [<8143036e>] common_interrupt+0x2e/0x33
             [<8142f23c>] _raw_spin_unlock_irqrestore+0x3f/0x49
             [<811c25a4>] uart_start+0x2d/0x32
             [<811c2c04>] uart_write+0xc7/0xd6
             [<811bc6f6>] n_tty_write+0xb8/0x35e
             [<811b9beb>] tty_write+0x163/0x1e4
             [<811b9cd9>] redirected_tty_write+0x6d/0x75
             [<810b6ed6>] vfs_write+0x75/0xb0
             [<810b7265>] SyS_write+0x44/0x77
             [<8142f8ee>] syscall_call+0x7/0xb
      
      -> #0 (&port_lock_key){-.....}:
             [<8104a62d>] __lock_acquire+0x9ea/0xc6d
             [<8104a942>] lock_acquire+0x92/0x101
             [<8142f11d>] _raw_spin_lock_irqsave+0x2e/0x3e
             [<811c60be>] serial8250_console_write+0x8c/0x10c
             [<8104e402>] call_console_drivers.constprop.31+0x87/0x118
             [<8104f5d5>] console_unlock+0x1d7/0x398
             [<8104fb70>] vprintk_emit+0x3da/0x3e4
             [<81425f76>] printk+0x17/0x19
             [<8105bfa0>] clockevents_program_min_delta+0x104/0x116
             [<8105c548>] clockevents_program_event+0xe7/0xf3
             [<8105cc1c>] tick_program_event+0x1e/0x23
             [<8103c43c>] hrtimer_force_reprogram+0x88/0x8f
             [<8103c49e>] __remove_hrtimer+0x5b/0x79
             [<8103cb21>] hrtimer_try_to_cancel+0x49/0x66
             [<8103cb4b>] hrtimer_cancel+0xd/0x18
             [<8107f102>] perf_swevent_cancel_hrtimer.part.60+0x2b/0x30
             [<81080705>] task_clock_event_stop+0x20/0x64
             [<81080756>] task_clock_event_del+0xd/0xf
             [<81081350>] event_sched_out+0xab/0x11e
             [<810813e0>] group_sched_out+0x1d/0x66
             [<81081682>] ctx_sched_out+0xaf/0xbf
             [<81081e04>] __perf_event_task_sched_out+0x1ed/0x34f
             [<8142cacc>] __schedule+0x4c6/0x4cb
             [<8142cae0>] schedule+0xf/0x11
             [<8142f9a6>] work_resched+0x5/0x30
      
      other info that might help us debug this:
      
      Chain exists of:
        &port_lock_key --> &ctx->lock --> hrtimer_bases.lock
      
       Possible unsafe locking scenario:
      
             CPU0                    CPU1
             ----                    ----
        lock(hrtimer_bases.lock);
                                     lock(&ctx->lock);
                                     lock(hrtimer_bases.lock);
        lock(&port_lock_key);
      
       *** DEADLOCK ***
      
      4 locks held by trinity-main/74:
       #0:  (&rq->lock){-.-.-.}, at: [<8142c6f3>] __schedule+0xed/0x4cb
       #1:  (&ctx->lock){......}, at: [<81081df3>] __perf_event_task_sched_out+0x1dc/0x34f
       #2:  (hrtimer_bases.lock){-.-...}, at: [<8103caeb>] hrtimer_try_to_cancel+0x13/0x66
       #3:  (console_lock){+.+...}, at: [<8104fb5d>] vprintk_emit+0x3c7/0x3e4
      
      stack backtrace:
      CPU: 0 PID: 74 Comm: trinity-main Not tainted 3.15.0-rc8-06195-g939f04be #2
       00000000 81c3a310 8b995c14 81426f69 8b995c44 81425a99 8161f671 8161f570
       8161f538 8161f559 8161f538 8b995c78 8b142bb0 00000004 8b142fdc 8b142bb0
       8b995ca8 8104a62d 8b142fac 000016f2 81c3a310 00000001 00000001 00000003
      Call Trace:
       [<81426f69>] dump_stack+0x16/0x18
       [<81425a99>] print_circular_bug+0x18f/0x19c
       [<8104a62d>] __lock_acquire+0x9ea/0xc6d
       [<8104a942>] lock_acquire+0x92/0x101
       [<811c60be>] ? serial8250_console_write+0x8c/0x10c
       [<811c6032>] ? wait_for_xmitr+0x76/0x76
       [<8142f11d>] _raw_spin_lock_irqsave+0x2e/0x3e
       [<811c60be>] ? serial8250_console_write+0x8c/0x10c
       [<811c60be>] serial8250_console_write+0x8c/0x10c
       [<8104af87>] ? lock_release+0x191/0x223
       [<811c6032>] ? wait_for_xmitr+0x76/0x76
       [<8104e402>] call_console_drivers.constprop.31+0x87/0x118
       [<8104f5d5>] console_unlock+0x1d7/0x398
       [<8104fb70>] vprintk_emit+0x3da/0x3e4
       [<81425f76>] printk+0x17/0x19
       [<8105bfa0>] clockevents_program_min_delta+0x104/0x116
       [<8105cc1c>] tick_program_event+0x1e/0x23
       [<8103c43c>] hrtimer_force_reprogram+0x88/0x8f
       [<8103c49e>] __remove_hrtimer+0x5b/0x79
       [<8103cb21>] hrtimer_try_to_cancel+0x49/0x66
       [<8103cb4b>] hrtimer_cancel+0xd/0x18
       [<8107f102>] perf_swevent_cancel_hrtimer.part.60+0x2b/0x30
       [<81080705>] task_clock_event_stop+0x20/0x64
       [<81080756>] task_clock_event_del+0xd/0xf
       [<81081350>] event_sched_out+0xab/0x11e
       [<810813e0>] group_sched_out+0x1d/0x66
       [<81081682>] ctx_sched_out+0xaf/0xbf
       [<81081e04>] __perf_event_task_sched_out+0x1ed/0x34f
       [<8104416d>] ? __dequeue_entity+0x23/0x27
       [<81044505>] ? pick_next_task_fair+0xb1/0x120
       [<8142cacc>] __schedule+0x4c6/0x4cb
       [<81047574>] ? trace_hardirqs_off_caller+0xd7/0x108
       [<810475b0>] ? trace_hardirqs_off+0xb/0xd
       [<81056346>] ? rcu_irq_exit+0x64/0x77
      
      Fix the problem by using printk_deferred() which does not call into the
      scheduler.
      Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      504d5874
    • Eric Biggers's avatar
      vfs: fix check for fallocate on active swapfile · 6d2b6170
      Eric Biggers authored
      Fix the broken check for calling sys_fallocate() on an active swapfile,
      introduced by commit 0790b31b ("fs: disallow all fallocate
      operation on active swapfile").
      Signed-off-by: default avatarEric Biggers <ebiggers3@gmail.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      6d2b6170
    • Christoph Hellwig's avatar
      direct-io: fix AIO regression · af436472
      Christoph Hellwig authored
      The direct-io.c rewrite to use the iov_iter infrastructure stopped updating
      the size field in struct dio_submit, and thus rendered the check for
      allowing asynchronous completions to always return false.  Fix this by
      comparing it to the count of bytes in the iov_iter instead.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reported-by: default avatarTim Chen <tim.c.chen@linux.intel.com>
      Tested-by: default avatarTim Chen <tim.c.chen@linux.intel.com>
      af436472
  5. 31 Jul, 2014 1 commit