1. 20 Jul, 2012 3 commits
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpufreq' · 75a4161a
      Rafael J. Wysocki authored
      * pm-cpufreq:
        cpufreq: Fix sysfs deadlock with concurrent hotplug/frequency switch
        EXYNOS: bugfix on retrieving old_index from freqs.old
      75a4161a
    • Stephen Boyd's avatar
      cpufreq: Fix sysfs deadlock with concurrent hotplug/frequency switch · a9144436
      Stephen Boyd authored
      Running one program that continuously hotplugs and replugs a cpu
      concurrently with another program that continuously writes to the
      scaling_setspeed node eventually deadlocks with:
      
      =============================================
      [ INFO: possible recursive locking detected ]
      3.4.0 #37 Tainted: G        W
      ---------------------------------------------
      filemonkey/122 is trying to acquire lock:
       (s_active#13){++++.+}, at: [<c01a3d28>] sysfs_remove_dir+0x9c/0xb4
      
      but task is already holding lock:
       (s_active#13){++++.+}, at: [<c01a22f0>] sysfs_write_file+0xe8/0x140
      
      other info that might help us debug this:
       Possible unsafe locking scenario:
      
             CPU0
             ----
        lock(s_active#13);
        lock(s_active#13);
      
       *** DEADLOCK ***
      
       May be due to missing lock nesting notation
      
      2 locks held by filemonkey/122:
       #0:  (&buffer->mutex){+.+.+.}, at: [<c01a2230>] sysfs_write_file+0x28/0x140
       #1:  (s_active#13){++++.+}, at: [<c01a22f0>] sysfs_write_file+0xe8/0x140
      
      stack backtrace:
      [<c0014fcc>] (unwind_backtrace+0x0/0x120) from [<c00ca600>] (validate_chain+0x6f8/0x1054)
      [<c00ca600>] (validate_chain+0x6f8/0x1054) from [<c00cb778>] (__lock_acquire+0x81c/0x8d8)
      [<c00cb778>] (__lock_acquire+0x81c/0x8d8) from [<c00cb9c0>] (lock_acquire+0x18c/0x1e8)
      [<c00cb9c0>] (lock_acquire+0x18c/0x1e8) from [<c01a3ba8>] (sysfs_addrm_finish+0xd0/0x180)
      [<c01a3ba8>] (sysfs_addrm_finish+0xd0/0x180) from [<c01a3d28>] (sysfs_remove_dir+0x9c/0xb4)
      [<c01a3d28>] (sysfs_remove_dir+0x9c/0xb4) from [<c02d0e5c>] (kobject_del+0x10/0x38)
      [<c02d0e5c>] (kobject_del+0x10/0x38) from [<c02d0f74>] (kobject_release+0xf0/0x194)
      [<c02d0f74>] (kobject_release+0xf0/0x194) from [<c0565a98>] (cpufreq_cpu_put+0xc/0x24)
      [<c0565a98>] (cpufreq_cpu_put+0xc/0x24) from [<c05683f0>] (store+0x6c/0x74)
      [<c05683f0>] (store+0x6c/0x74) from [<c01a2314>] (sysfs_write_file+0x10c/0x140)
      [<c01a2314>] (sysfs_write_file+0x10c/0x140) from [<c014af44>] (vfs_write+0xb0/0x128)
      [<c014af44>] (vfs_write+0xb0/0x128) from [<c014b06c>] (sys_write+0x3c/0x68)
      [<c014b06c>] (sys_write+0x3c/0x68) from [<c000e0e0>] (ret_fast_syscall+0x0/0x3c)
      
      This is because store() in cpufreq.c indirectly calls
      kobject_get() via cpufreq_cpu_get() and is the last one to call
      kobject_put() via cpufreq_cpu_put(). Sysfs code should not call
      kobject_get() or kobject_put() directly (see the comment around
      sysfs_schedule_callback() for more information).
      
      Fix this deadlock by introducing two new functions:
      
      	struct cpufreq_policy *cpufreq_cpu_get_sysfs(unsigned int cpu)
      	void cpufreq_cpu_put_sysfs(struct cpufreq_policy *data)
      
      which do the same thing as cpufreq_cpu_{get,put}() but don't call
      kobject functions.
      
      To easily trigger this deadlock you can insert an msleep() with a
      reasonably large value right after the fail label at the bottom
      of the store() function in cpufreq.c and then write
      scaling_setspeed in one task and offline the cpu in another. The
      first task will hang and be detected by the hung task detector.
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      a9144436
    • Jonghwa Lee's avatar
      EXYNOS: bugfix on retrieving old_index from freqs.old · 53df1ad5
      Jonghwa Lee authored
      The policy might have been changed since last call of target().
      Thus, using cpufreq_frequency_table_target(), which depends on
      policy to find the corresponding index from a frequency, may return
      inconsistent index for freqs.old. Thus, old_index should be
      calculated not based on the current policy.
      
      We have been observing such issue when scaling_min/max_freq were
      updated and sometimes cuased system lockups deu to incorrectly
      configured voltages.
      Signed-off-by: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      53df1ad5
  2. 19 Jul, 2012 2 commits
  3. 18 Jul, 2012 12 commits
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-qos' · bd798b7a
      Rafael J. Wysocki authored
      * pm-qos:
        PM / QoS: Use NULL pointer instead of plain integer in qos.c
        PM / QoS: Use NULL pointer instead of plain integer in pm_qos.h
      bd798b7a
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-doc' · b4269e27
      Rafael J. Wysocki authored
      * pm-doc:
        PM / Documentation: fix typos in power management description
      b4269e27
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-drivers' · bfaa07bc
      Rafael J. Wysocki authored
      * pm-drivers:
        rtc-cmos: report wakeups from interrupt handler
        PM / crypto / ux500: Use struct dev_pm_ops for power management
        PM / IPMI: Remove empty legacy PCI PM callbacks
        tpm_nsc: Use struct dev_pm_ops for power management
        tpm_tis: Use struct dev_pm_ops for power management
        tpm_atmel: Use struct dev_pm_ops for power management
        PM / TPM: Drop unused pm_message_t argument from tpm_pm_suspend()
        omap-rng: Use struct dev_pm_ops for power management
        mg_disk: Use struct dev_pm_ops for power management
        msi-laptop: Use struct dev_pm_ops for power management
        hdaps: Use struct dev_pm_ops for power management
        sonypi: Use struct dev_pm_ops for power management
        intel_mid_thermal: Use struct dev_pm_ops for power management
        acer-wmi: Use struct dev_pm_ops for power management
        intel_ips: Remove empty legacy PM callbacks
        thinkpad_acpi: Use struct dev_pm_ops instead of legacy PM routines
        thinkpad_acpi: Drop pm_message_t arguments from suspend routines
      bfaa07bc
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-acpi' · 6148d38b
      Rafael J. Wysocki authored
      * pm-acpi: (24 commits)
        olpc-xo15-sci: Use struct dev_pm_ops for power management
        ACPI / PM: Drop PM callbacks from the ACPI bus type
        ACPI / PM: Drop legacy driver PM callbacks that are not used any more
        ACPI / PM: Do not execute legacy driver PM callbacks
        acpi_power_meter: Use struct dev_pm_ops for power management
        fujitsu-tablet: Use struct dev_pm_ops for power management
        classmate-laptop: Use struct dev_pm_ops for power management
        xo15-ebook: Use struct dev_pm_ops for power management
        toshiba_bluetooth: Use struct dev_pm_ops for power management
        panasonic-laptop: Use struct dev_pm_ops for power management
        sony-laptop: Use struct dev_pm_ops for power management
        hp_accel: Use struct dev_pm_ops for power management
        toshiba_acpi: Use struct dev_pm_ops for power management
        ACPI: Use struct dev_pm_ops for power management in the SBS driver
        ACPI: Use struct dev_pm_ops for power management in the power driver
        ACPI: Use struct dev_pm_ops for power management in the button driver
        ACPI: Use struct dev_pm_ops for power management in the battery driver
        ACPI: Use struct dev_pm_ops for power management in the AC driver
        ACPI: Use struct dev_pm_ops for power management in processor driver
        ACPI: Use struct dev_pm_ops for power management in the thermal driver
        ...
      6148d38b
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-sleep' · d52fdf13
      Rafael J. Wysocki authored
      * pm-sleep:
        PM / Sleep: Require CAP_BLOCK_SUSPEND to use wake_lock/wake_unlock
        PM / Sleep: Add missing static storage class specifiers in main.c
        PM / Sleep: Fix build warning in sysfs.c for CONFIG_PM_SLEEP unset
        PM / Hibernate: Print hibernation/thaw progress indicator one line at a time.
        PM / Sleep: Separate printing suspend times from initcall_debug
        PM / Sleep: add knob for printing device resume times
        ftrace: Disable function tracing during suspend/resume and hibernation, again
        PM / Hibernate: Enable suspend to both for in-kernel hibernation.
      d52fdf13
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-domains' · 7791bd23
      Rafael J. Wysocki authored
      * pm-domains:
        PM / Domains: Fix build warning for CONFIG_PM_RUNTIME unset
        PM / Domains: Replace plain integer with NULL pointer in domain.c file
        PM / Domains: Add missing static storage class specifier in domain.c file
        PM / Domains: Allow device callbacks to be added at any time
        PM / Domains: Add device domain data reference counter
        PM / Domains: Add preliminary support for cpuidle, v2
        PM / Domains: Do not stop devices after restoring their states
        PM / Domains: Use subsystem runtime suspend/resume callbacks by default
      7791bd23
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpuidle' · 3db0bc97
      Rafael J. Wysocki authored
      3db0bc97
    • Sachin Kamat's avatar
      PM / QoS: Use NULL pointer instead of plain integer in qos.c · ad0446eb
      Sachin Kamat authored
      Fix the following sparse warning:
      drivers/base/power/qos.c:465:29: warning: Using plain integer as NULL pointer
      Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      ad0446eb
    • Sachin Kamat's avatar
      PM / QoS: Use NULL pointer instead of plain integer in pm_qos.h · 83618092
      Sachin Kamat authored
      Fix the following sparse warning:
      include/linux/pm_qos.h:69:28: warning: Using plain integer as NULL pointer
      Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      83618092
    • Rafael J. Wysocki's avatar
      PM / Sleep: Require CAP_BLOCK_SUSPEND to use wake_lock/wake_unlock · 11388c87
      Rafael J. Wysocki authored
      Require processes wanting to use the wake_lock/wake_unlock sysfs
      files to have the CAP_BLOCK_SUSPEND capability, which also is
      required for the eventpoll EPOLLWAKEUP flag to be effective, so that
      all interfaces related to blocking autosleep depend on the same
      capability.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Cc: stable@vger.kernel.org
      Acked-by: default avatarMichael Kerrisk <mtk.man-pages@gmail.com>
      11388c87
    • Rafael J. Wysocki's avatar
      Merge branch 'fixes' into pm-sleep · 823d9364
      Rafael J. Wysocki authored
      The 'fixes' branch contains material the next commit depends on.
      823d9364
    • Sachin Kamat's avatar
      PM / Sleep: Add missing static storage class specifiers in main.c · 7664e969
      Sachin Kamat authored
      Fix the following sparse warnings:
      drivers/base/power/main.c:48:1: warning: symbol 'dpm_prepared_list' was not declared. Should it be static?
      drivers/base/power/main.c:49:1: warning: symbol 'dpm_suspended_list' was not declared. Should it be static?
      drivers/base/power/main.c:50:1: warning: symbol 'dpm_late_early_list' was not declared. Should it be static?
      drivers/base/power/main.c:51:1: warning: symbol 'dpm_noirq_list' was not declared. Should it be static?
      Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      7664e969
  4. 17 Jul, 2012 5 commits
  5. 14 Jul, 2012 11 commits
  6. 13 Jul, 2012 7 commits
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d55e5bd0
      Linus Torvalds authored
      Pull the leap second fixes from Thomas Gleixner:
       "It's a rather large series, but well discussed, refined and reviewed.
        It got a massive testing by John, Prarit and tip.
      
        In theory we could split it into two parts.  The first two patches
      
          f55a6faa: hrtimer: Provide clock_was_set_delayed()
          4873fa07: timekeeping: Fix leapsecond triggered load spike issue
      
        are merely preventing the stuff loops forever issues, which people
        have observed.
      
        But there is no point in delaying the other 4 commits which achieve
        full correctness into 3.6 as they are tagged for stable anyway.  And I
        rather prefer to have the full fixes merged in bulk than a "prevent
        the observable wreckage and deal with the hidden fallout later"
        approach."
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        hrtimer: Update hrtimer base offsets each hrtimer_interrupt
        timekeeping: Provide hrtimer update function
        hrtimers: Move lock held region in hrtimer_interrupt()
        timekeeping: Maintain ktime_t based offsets for hrtimers
        timekeeping: Fix leapsecond triggered load spike issue
        hrtimer: Provide clock_was_set_delayed()
      d55e5bd0
    • Will Drewry's avatar
      x86/vsyscall: allow seccomp filter in vsyscall=emulate · 5651721e
      Will Drewry authored
      If a seccomp filter program is installed, older static binaries and
      distributions with older libc implementations (glibc 2.13 and earlier)
      that rely on vsyscall use will be terminated regardless of the filter
      program policy when executing time, gettimeofday, or getcpu.  This is
      only the case when vsyscall emulation is in use (vsyscall=emulate is the
      default).
      
      This patch emulates system call entry inside a vsyscall=emulate by
      populating regs->ax and regs->orig_ax with the system call number prior
      to calling into seccomp such that all seccomp-dependencies function
      normally.  Additionally, system call return behavior is emulated in line
      with other vsyscall entrypoints for the trace/trap cases.
      
      [ v2: fixed ip and sp on SECCOMP_RET_TRAP/TRACE (thanks to luto@mit.edu) ]
      Reported-and-tested-by: default avatarOwen Kibel <qmewlo@gmail.com>
      Signed-off-by: default avatarWill Drewry <wad@chromium.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5651721e
    • Linus Torvalds's avatar
      Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging · ac7d181e
      Linus Torvalds authored
      Please pull one hwmon subsystem fix from Jean Delvare.
      
      * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
        hwmon: (it87) Preserve configuration register bits on init
      ac7d181e
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-3.5-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 4264e6a2
      Linus Torvalds authored
      Pull NFS client bugfixes from Trond Myklebust:
       - Fix an NFSv4 mount regression
       - Fix O_DIRECT list manipulation snafus
      
      * tag 'nfs-for-3.5-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFSv4: Fix an NFSv4 mount regression
        NFS: Fix list manipulation snafus in fs/nfs/direct.c
      4264e6a2
    • Dave Jones's avatar
      Remove easily user-triggerable BUG from generic_setlease · 8d657eb3
      Dave Jones authored
      This can be trivially triggered from userspace by passing in something unexpected.
      
          kernel BUG at fs/locks.c:1468!
          invalid opcode: 0000 [#1] SMP
          RIP: 0010:generic_setlease+0xc2/0x100
          Call Trace:
            __vfs_setlease+0x35/0x40
            fcntl_setlease+0x76/0x150
            sys_fcntl+0x1c6/0x810
            system_call_fastpath+0x1a/0x1f
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      Cc: stable@kernel.org # 3.2+
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8d657eb3
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 39ea32ca
      Linus Torvalds authored
      Pull input layer fixes from Dmitry Torokhov:
       "The changes are limited to adding new VID/PID combinations to drivers
        to enable support for new versions of hardware, most notably hardware
        found in new MacBook Pro Retina boxes."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: xpad - add Andamiro Pump It Up pad
        Input: xpad - add signature for Razer Onza Tournament Edition
        Input: xpad - handle all variations of Mad Catz Beat Pad
        Input: bcm5974 - Add support for 2012 MacBook Pro Retina
        HID: add support for 2012 MacBook Pro Retina
      39ea32ca
    • Linus Torvalds's avatar
      Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 8488e408
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
       - Some regression fixes at the audio part for devices with
         cx23885/cx25840
       - A DMA corruption fix at cx231xx
       - two fixes at the winbond IR driver
       - Several fixes for the EXYNOS media driver (s5p)
       - two fixes at the OMAP3 preview driver
       - one fix at the dvb core failure path
       - an include missing (slab.h) at smiapp-core causing compilation
         breakage
       - em28xx was not loading the IR driver driver anymore.
      
      * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (31 commits)
        [media] Revert "[media] V4L: JPEG class documentation corrections"
        [media] s5p-fimc: Add missing FIMC-LITE file operations locking
        [media] omap3isp: preview: Fix contrast and brightness handling
        [media] omap3isp: preview: Fix output size computation depending on input format
        [media] winbond-cir: Initialise timeout, driver_type and allowed_protos
        [media] winbond-cir: Fix txandrx module info
        [media] cx23885: Silence unknown command warnings
        [media] cx23885: add support for HVR-1255 analog (cx23888 variant)
        [media] cx23885: make analog support work for HVR_1250 (cx23885 variant)
        [media] cx25840: fix vsrc/hsrc usage on cx23888 designs
        [media] cx25840: fix regression in HVR-1800 analog audio
        [media] cx25840: fix regression in analog support hue/saturation controls
        [media] cx25840: fix regression in HVR-1800 analog support
        [media] s5p-mfc: Fixed setup of custom controls in decoder and encoder
        [media] cx231xx: don't DMA to random addresses
        [media] em28xx: fix em28xx-rc load
        [media] dvb-core: Release semaphore on error path dvb_register_device()
        [media] s5p-fimc: Stop media entity pipeline if fimc_pipeline_validate fails
        [media] s5p-fimc: Fix compiler warning in fimc-lite.c
        [media] s5p-fimc: media_entity_pipeline_start() may fail
        ...
      8488e408