1. 10 7月, 2015 6 次提交
  2. 09 7月, 2015 6 次提交
    • L
      Merge tag 'pm+acpi-4.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 883a2dfd
      Linus Torvalds 提交于
      Pull power management and ACPI updates from Rafael Wysocki:
       "These are fixes on top of the previous PM+ACPI pull requests
        (including one fix for a 4.1 regression) and two commits adding
        _CLS-based device enumeration support to the ACPI core and the ATA
        subsystem that waited for the latest ACPICA changes to be merged.
      
        Specifics:
      
         - Fix for an ACPI resources management regression introduced during
           the 4.1 cycle (that unfortunately went into -stable) effectively
           reverting the bad commit along with the recent fixups on top of it
           and using an alternative approach to address the underlying issue
           (Rafael J Wysocki).
      
         - Fix for a memory leak and an incorrect return value in an error
           code path in the ACPI LPSS (Low-Power Subsystem) driver (Rafael J
           Wysocki).
      
         - Fix for a leftover dangling pointer in an error code path in the
           new wakeup IRQ support code (Rafael J Wysocki).
      
         - Fix to prevent infinite loops (due to errors in other places) from
           happening in the core generic PM domains support code (Geert
           Uytterhoeven).
      
         - Hibernation documentation update/clarification (Uwe Geuder).
      
         - Support for _CLS-based device enumeration in the ACPI core and in
           the ATA subsystem (Suravee Suthikulpanit)"
      
      * tag 'pm+acpi-4.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM / wakeirq: Avoid setting power.wakeirq too hastily
        ata: ahci_platform: Add ACPI _CLS matching
        ACPI / scan: Add support for ACPI _CLS device matching
        PM / hibernate: clarify resume documentation
        PM / Domains: Avoid infinite loops in attach/detach code
        ACPI / LPSS: Fix up acpi_lpss_create_device()
        ACPI / PNP: Reserve ACPI resources at the fs_initcall_sync stage
      883a2dfd
    • L
      Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile · 331c5841
      Linus Torvalds 提交于
      Pull arch/tile fix from Chris Metcalf:
       "This fix eliminates a "section mismatch" warning caused by the new
        __ex_table checking code in modpost"
      
      * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
        modpost: work correctly with tile coldtext sections
      331c5841
    • L
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux · 9d993ccb
      Linus Torvalds 提交于
      Pull module fix from Rusty Russell:
       "Single fix: missing rbtree removal in the module load failure path.
        Easy to trigger with bad params.
      
        Thanks to Peter Zijlstra and Arthur Marsh for going around on this
        one"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
        module: Fix load_module() error path
      9d993ccb
    • C
      modpost: work correctly with tile coldtext sections · 673c2c34
      Chris Metcalf 提交于
      The tilegx and tilepro compilers use .coldtext for their unlikely
      executed text section name, so an __attribute__((cold)) function
      will (when compiled with higher optimization levels) land in
      the .coldtext section.
      
      Modify modpost to add .coldtext to the set of OTHER_TEXT_SECTIONS
      so we don't get warnings about referencing such a section in an
      __ex_table block, and then also modify arch/tile/lib/memcpy_user_64.c
      so that it uses plain ".coldtext" instead of ".coldtext.memcpy".
      The latter naming is a relic of an earlier use of -ffunction-sections,
      which we no longer use by default.
      Signed-off-by: NChris Metcalf <cmetcalf@ezchip.com>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      673c2c34
    • P
      module: Fix load_module() error path · 758556bd
      Peter Zijlstra 提交于
      The load_module() error path frees a module but forgot to take it out
      of the mod_tree, leaving a dangling entry in the tree, causing havoc.
      
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Reported-by: NArthur Marsh <arthur.marsh@internode.on.net>
      Tested-by: NArthur Marsh <arthur.marsh@internode.on.net>
      Fixes: 93c2e105 ("module: Optimize __module_address() using a latched RB-tree")
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      758556bd
    • L
      Fix broken audit tests for exec arg len · 45820c29
      Linus Torvalds 提交于
      The "fix" in commit 0b08c5e5 ("audit: Fix check of return value of
      strnlen_user()") didn't fix anything, it broke things.  As reported by
      Steven Rostedt:
      
       "Yes, strnlen_user() returns 0 on fault, but if you look at what len is
        set to, than you would notice that on fault len would be -1"
      
      because we just subtracted one from the return value.  So testing
      against 0 doesn't test for a fault condition, it tests against a
      perfectly valid empty string.
      
      Also fix up the usual braindamage wrt using WARN_ON() inside a
      conditional - make it part of the conditional and remove the explicit
      unlikely() (which is already part of the WARN_ON*() logic, exactly so
      that you don't have to write unreadable code.
      Reported-and-tested-by: NSteven Rostedt <rostedt@goodmis.org>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Paul Moore <pmoore@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      45820c29
  3. 08 7月, 2015 5 次提交
    • L
      Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm · d6ac4ffc
      Linus Torvalds 提交于
      Pull ARM updates from Russell King:
       "These are late by a week; they should have been merged during the
        merge window, but unfortunately, the ARM kernel build/boot farms were
        indicating random failures, and it wasn't clear whether the cause was
        something in these changes or something during the merge window.
      
        This is a set of merge window fixes with some documentation additions"
      
      * 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
        ARM: avoid unwanted GCC memset()/memcpy() optimisations for IO variants
        ARM: pgtable: document mapping types
        ARM: io: convert ioremap*() to functions
        ARM: io: fix ioremap_wt() implementation
        ARM: io: document ARM specific behaviour of ioremap*() implementations
        ARM: fix lockdep unannotated irqs-off warning
        ARM: 8397/1: fix vdsomunge not to depend on glibc specific error.h
        ARM: add helpful message when truncating physical memory
        ARM: add help text for HIGHPTE configuration entry
        ARM: fix DEBUG_SET_MODULE_RONX build dependencies
        ARM: 8396/1: use phys_addr_t in pfn_to_kaddr()
        ARM: 8394/1: update memblock limit after mapping lowmem
        ARM: 8393/1: smp: Fix suspicious RCU usage with ipi tracepoints
      d6ac4ffc
    • T
      mei: nfc: fix deadlock on shutdown/suspend path · 4f273959
      Tomas Winkler 提交于
      In function mei_nfc_host_exit mei_cl_remove_device cannot be called
      under the device mutex as device removing flow invokes the device driver
      remove handler that calls in turn to mei_cl_disable_device which
      naturally acquires the device mutex.
      
      Also remove mei_cl_bus_remove_devices which has the same issue, but is
      never executed as currently the only device on the mei client bus is NFC
      and a new device cannot be easily added till the bus revamp is
      completed.
      
      This fixes regression caused by commit be9b720a ("mei_phy: move all
      nfc logic from mei driver to nfc")
      
      Prior to this change the nfc driver remove handler called to no-op
      disable function while actual nfc device was disabled directly from the
      mei driver.
      Reported-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4f273959
    • R
      Merge branch 'acpi-scan' · 8076ca48
      Rafael J. Wysocki 提交于
      * acpi-scan:
        ata: ahci_platform: Add ACPI _CLS matching
        ACPI / scan: Add support for ACPI _CLS device matching
      8076ca48
    • R
      Merge branches 'acpi-pnp', 'acpi-soc', 'pm-domains' and 'pm-sleep' · d0aee67f
      Rafael J. Wysocki 提交于
      * acpi-pnp:
        ACPI / PNP: Reserve ACPI resources at the fs_initcall_sync stage
      
      * acpi-soc:
        ACPI / LPSS: Fix up acpi_lpss_create_device()
      
      * pm-domains:
        PM / Domains: Avoid infinite loops in attach/detach code
      
      * pm-sleep:
        PM / hibernate: clarify resume documentation
      d0aee67f
    • R
      Merge branch 'pm-wakeirq' · 3fc7aeeb
      Rafael J. Wysocki 提交于
      * pm-wakeirq:
        PM / wakeirq: Avoid setting power.wakeirq too hastily
      3fc7aeeb
  4. 07 7月, 2015 9 次提交
    • R
      Merge branches 'fixes' and 'ioremap' into for-linus · 06be5eef
      Russell King 提交于
      06be5eef
    • R
      PM / wakeirq: Avoid setting power.wakeirq too hastily · 6d3dab7d
      Rafael J. Wysocki 提交于
      If dev_pm_attach_wake_irq() fails, the device's power.wakeirq field
      should not be set to point to the struct wake_irq passed to that
      function, as that object will be freed going forward.
      
      For this reason, make dev_pm_attach_wake_irq() first call
      device_wakeup_attach_irq() and only set the device's power.wakeirq
      field if that's successful.
      
      That requires device_wakeup_attach_irq() to be called under the
      device's power.lock lock, but since dev_pm_attach_wake_irq() is
      the only caller of it, the requisite changes are easy to make.
      
      Fixes: 4990d4fe (PM / Wakeirq: Add automated device wake IRQ handling)
      Reported-by: NFelipe Balbi <balbi@ti.com>
      Tested-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      6d3dab7d
    • L
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c7e9ad7d
      Linus Torvalds 提交于
      Pull perf fixes from Ingo Molnar:
      
       - fix the perf build, by fixing the rbtree.c sharing bug between kernel
         and tools/perf by creating a local copy of rbtree.c (more will be
         done for v4.3)
      
       - fix an AUX buffer (Intel-PT support) refcounting bug
      
       - fix copy_from_user_nmi() return value"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86: Fix copy_from_user_nmi() return if range is not ok
        perf: Fix AUX buffer refcounting
        tools: Copy rbtree_augmented.h from the kernel
        tools: Move rbtree.h from tools/perf/
        tools: Copy lib/rbtree.c to tools/lib/
        perf tools: Copy rbtree.h from the kernel
        tools: Adopt {READ,WRITE_ONCE} from the kernel
      c7e9ad7d
    • S
      ata: ahci_platform: Add ACPI _CLS matching · 2051e924
      Suthikulpanit, Suravee 提交于
      This patch adds ACPI supports for AHCI platform driver, which uses _CLS
      method to match the device.
      
      The following is an example of ASL structure in DSDT for a SATA controller,
      which contains _CLS package to be matched by the ahci_platform driver:
      
        Device (AHC0) // AHCI Controller
        {
          Name(_HID, "AMDI0600")
          Name (_CCA, 1)
          Name (_CLS, Package (3)
          {
            0x01, // Base Class: Mass Storage
            0x06, // Sub-Class: serial ATA
            0x01, // Interface: AHCI
          })
          Name (_CRS, ResourceTemplate ()
          {
            Memory32Fixed (ReadWrite, 0xE0300000, 0x00010000)
            Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive,,,) { 387 }
          })
        }
      
      Also, since ATA driver should not require PCI support for ATA_ACPI,
      this patch removes dependency in the driver/ata/Kconfig.
      Acked-by: NTejun Heo <tj@kernel.org>
      Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: NHanjun Guo <hanjun.guo@linaro.org>
      Signed-off-by: NSuravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      2051e924
    • S
      ACPI / scan: Add support for ACPI _CLS device matching · 26095a01
      Suthikulpanit, Suravee 提交于
      Device drivers typically use ACPI _HIDs/_CIDs listed in struct device_driver
      acpi_match_table to match devices. However, for generic drivers, we do not
      want to list _HID for all supported devices. Also, certain classes of devices
      do not have _CID (e.g. SATA, USB). Instead, we can leverage ACPI _CLS,
      which specifies PCI-defined class code (i.e. base-class, subclass and
      programming interface). This patch adds support for matching ACPI devices using
      the _CLS method.
      
      To support loadable module, current design uses _HID or _CID to match device's
      modalias. With the new way of matching with _CLS this would requires modification
      to the current ACPI modalias key to include _CLS. This patch appends PCI-defined
      class-code to the existing ACPI modalias as following.
      
          acpi:<HID>:<CID1>:<CID2>:..:<CIDn>:<bbsspp>:
      E.g:
          # cat /sys/devices/platform/AMDI0600:00/modalias
          acpi:AMDI0600:010601:
      
      where bb is th base-class code, ss is te sub-class code, and pp is the
      programming interface code
      
      Since there would not be _HID/_CID in the ACPI matching table of the driver,
      this patch adds a field to acpi_device_id to specify the matching _CLS.
      
          static const struct acpi_device_id ahci_acpi_match[] = {
              { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
              {},
          };
      
      In this case, the corresponded entry in modules.alias file would be:
      
          alias acpi*:010601:* ahci_platform
      Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: NHanjun Guo <hanjun.guo@linaro.org>
      Signed-off-by: NSuravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      26095a01
    • U
      PM / hibernate: clarify resume documentation · b51f9b10
      Uwe Geuder 提交于
      it was not the whole truth that kernel mode cannot be used with swap on LVM
      Signed-off-by: NUwe Geuder <linuxkernel2015-ugeuder@snkmail.com>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b51f9b10
    • G
      PM / Domains: Avoid infinite loops in attach/detach code · 93af5e93
      Geert Uytterhoeven 提交于
      If pm_genpd_{add,remove}_device() keeps on failing with -EAGAIN, we end
      up with an infinite loop in genpd_dev_pm_{at,de}tach().
      
      This may happen due to a genpd.prepared_count imbalance.  This is a bug
      elsewhere, but it will result in a system lock up, possibly during
      reboot of an otherwise functioning system.
      
      To avoid this, put a limit on the maximum number of loop iterations,
      using an exponential back-off mechanism.  If the limit is reached, the
      operation will just fail.  An error message is already printed.
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      93af5e93
    • R
      ACPI / LPSS: Fix up acpi_lpss_create_device() · d3e13ff3
      Rafael J. Wysocki 提交于
      Fix a return value (which should be a negative error code) and a
      memory leak (the list allocated by acpi_dev_get_resources() needs
      to be freed on ioremap() errors too) in acpi_lpss_create_device()
      introduced by commit 4483d59e 'ACPI / LPSS: check the result
      of ioremap()'.
      
      Fixes: 4483d59e 'ACPI / LPSS: check the result of ioremap()'
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Cc: 4.0+ <stable@vger.kernel.org> # 4.0+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      d3e13ff3
    • R
      ACPI / PNP: Reserve ACPI resources at the fs_initcall_sync stage · 0294112e
      Rafael J. Wysocki 提交于
      This effectively reverts the following three commits:
      
       7bc10388 ACPI / resources: free memory on error in add_region_before()
       0f1b414d ACPI / PNP: Avoid conflicting resource reservations
       b9a5e5e1 ACPI / init: Fix the ordering of acpi_reserve_resources()
      
      (commit b9a5e5e1 introduced regressions some of which, but not
      all, were addressed by commit 0f1b414d and commit 7bc10388
      was a fixup on top of the latter) and causes ACPI fixed hardware
      resources to be reserved at the fs_initcall_sync stage of system
      initialization.
      
      The story is as follows.  First, a boot regression was reported due
      to an apparent resource reservation ordering change after a commit
      that shouldn't lead to such changes.  Investigation led to the
      conclusion that the problem happened because acpi_reserve_resources()
      was executed at the device_initcall() stage of system initialization
      which wasn't strictly ordered with respect to driver initialization
      (and with respect to the initialization of the pcieport driver in
      particular), so a random change causing the device initcalls to be
      run in a different order might break things.
      
      The response to that was to attempt to run acpi_reserve_resources()
      as soon as we knew that ACPI would be in use (commit b9a5e5e1).
      However, that turned out to be too early, because it caused resource
      reservations made by the PNP system driver to fail on at least one
      system and that failure was addressed by commit 0f1b414d.
      
      That fix still turned out to be insufficient, though, because
      calling acpi_reserve_resources() before the fs_initcall stage of
      system initialization caused a boot regression to happen on the
      eCAFE EC-800-H20G/S netbook.  That meant that we only could call
      acpi_reserve_resources() at the fs_initcall initialization stage
      or later, but then we might just as well call it after the PNP
      initalization in which case commit 0f1b414d wouldn't be
      necessary any more.
      
      For this reason, the changes made by commit 0f1b414d are reverted
      (along with a memory leak fixup on top of that commit), the changes
      made by commit b9a5e5e1 that went too far are reverted too and
      acpi_reserve_resources() is changed into fs_initcall_sync, which
      will cause it to be executed after the PNP subsystem initialization
      (which is an fs_initcall) and before device initcalls (including
      the pcieport driver initialization) which should avoid the initial
      issue.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=100581
      Link: http://marc.info/?t=143092384600002&r=1&w=2
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=99831
      Link: http://marc.info/?t=143389402600001&r=1&w=2
      Fixes: b9a5e5e1 "ACPI / init: Fix the ordering of acpi_reserve_resources()"
      Reported-by: NRoland Dreier <roland@purestorage.com>
      Cc: All applicable <stable@vger.kernel.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0294112e
  5. 06 7月, 2015 12 次提交
  6. 05 7月, 2015 2 次提交
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 1dc51b82
      Linus Torvalds 提交于
      Pull more vfs updates from Al Viro:
       "Assorted VFS fixes and related cleanups (IMO the most interesting in
        that part are f_path-related things and Eric's descriptor-related
        stuff).  UFS regression fixes (it got broken last cycle).  9P fixes.
        fs-cache series, DAX patches, Jan's file_remove_suid() work"
      
      [ I'd say this is much more than "fixes and related cleanups".  The
        file_table locking rule change by Eric Dumazet is a rather big and
        fundamental update even if the patch isn't huge.   - Linus ]
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (49 commits)
        9p: cope with bogus responses from server in p9_client_{read,write}
        p9_client_write(): avoid double p9_free_req()
        9p: forgetting to cancel request on interrupted zero-copy RPC
        dax: bdev_direct_access() may sleep
        block: Add support for DAX reads/writes to block devices
        dax: Use copy_from_iter_nocache
        dax: Add block size note to documentation
        fs/file.c: __fget() and dup2() atomicity rules
        fs/file.c: don't acquire files->file_lock in fd_install()
        fs:super:get_anon_bdev: fix race condition could cause dev exceed its upper limitation
        vfs: avoid creation of inode number 0 in get_next_ino
        namei: make set_root_rcu() return void
        make simple_positive() public
        ufs: use dir_pages instead of ufs_dir_pages()
        pagemap.h: move dir_pages() over there
        remove the pointless include of lglock.h
        fs: cleanup slight list_entry abuse
        xfs: Correctly lock inode when removing suid and file capabilities
        fs: Call security_ops->inode_killpriv on truncate
        fs: Provide function telling whether file_remove_privs() will do anything
        ...
      1dc51b82
    • L
      bluetooth: fix list handling · 9b284cbd
      Linus Torvalds 提交于
      Commit 835a6a2f ("Bluetooth: Stop sabotaging list poisoning")
      thought that the code was sabotaging the list poisoning when NULL'ing
      out the list pointers and removed it.
      
      But what was going on was that the bluetooth code was using NULL
      pointers for the list as a way to mark it empty, and that commit just
      broke it (and replaced the test with NULL with a "list_empty()" test on
      a uninitialized list instead, breaking things even further).
      
      So fix it all up to use the regular and real list_empty() handling
      (which does not use NULL, but a pointer to itself), also making sure to
      initialize the list properly (the previous NULL case was initialized
      implicitly by the session being allocated with kzalloc())
      
      This is a combination of patches by Marcel Holtmann and Tedd Ho-Jeong
      An.
      
      [ I would normally expect to get this through the bt tree, but I'm going
        to release -rc1, so I'm just committing this directly   - Linus ]
      Reported-and-tested-by: NJörg Otte <jrg.otte@gmail.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Original-by: NTedd Ho-Jeong An <tedd.an@intel.com>
      Original-by: Marcel Holtmann <marcel@holtmann.org>:
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9b284cbd