1. 24 11月, 2011 9 次提交
    • R
      Merge branch 'pm-freezer' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc into pm-freezer · 986b11c3
      Rafael J. Wysocki 提交于
      * 'pm-freezer' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc: (24 commits)
        freezer: fix wait_event_freezable/__thaw_task races
        freezer: kill unused set_freezable_with_signal()
        dmatest: don't use set_freezable_with_signal()
        usb_storage: don't use set_freezable_with_signal()
        freezer: remove unused @sig_only from freeze_task()
        freezer: use lock_task_sighand() in fake_signal_wake_up()
        freezer: restructure __refrigerator()
        freezer: fix set_freezable[_with_signal]() race
        freezer: remove should_send_signal() and update frozen()
        freezer: remove now unused TIF_FREEZE
        freezer: make freezing() test freeze conditions in effect instead of TIF_FREEZE
        cgroup_freezer: prepare for removal of TIF_FREEZE
        freezer: clean up freeze_processes() failure path
        freezer: kill PF_FREEZING
        freezer: test freezable conditions while holding freezer_lock
        freezer: make freezing indicate freeze condition in effect
        freezer: use dedicated lock instead of task_lock() + memory barrier
        freezer: don't distinguish nosig tasks on thaw
        freezer: remove racy clear_freeze_flag() and set PF_NOFREEZE on dead tasks
        freezer: rename thaw_process() to __thaw_task() and simplify the implementation
        ...
      986b11c3
    • R
      PM / Hibernate: Do not leak memory in error/test code paths · bb58dd5d
      Rafael J. Wysocki 提交于
      The hibernation core code forgets to release memory preallocated
      for hibernation if there's an error in its early stages or if test
      modes causing hibernation_snapshot() to return early are used.  This
      causes the system to be hardly usable, because the amount of
      preallocated memory is usually huge.  Fix this problem.
      Reported-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      bb58dd5d
    • L
      f10cdea6
    • L
      Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging · 5907c5f8
      Linus Torvalds 提交于
      * 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
        i2c: Make i2cdev_notifier_call static
        i2c: Delete ANY_I2C_BUS
        i2c: Fix device name for 10-bit slave address
        i2c-algo-bit: Generate correct i2c address sequence for 10-bit target
      5907c5f8
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · 0a2c9865
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: TPS65910: Fix VDD1/2 voltage selector count
      0a2c9865
    • L
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 2d0f2400
      Linus Torvalds 提交于
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (31 commits)
        drm: integer overflow in drm_mode_dirtyfb_ioctl()
        drivers/gpu/vga/vgaarb.c: add missing kfree
        drm/radeon/kms/atom: unify i2c gpio table handling
        drm/radeon/kms: fix up gpio i2c mask bits for r4xx for real
        ttm: Don't return the bo reserved on error path
        drm/radeon/kms: add a CS ioctl flag not to rewrite tiling flags in the CS
        drm/i915: Fix inconsistent backlight level during disabled
        drm, i915: Fix memory leak in i915_gem_busy_ioctl().
        drm/i915: Use DPCD value for max DP lanes.
        drm/i915: Initiate DP link training only on the lanes we'll be using
        drm/i915: Remove trailing white space
        drm/i915: Try harder during dp pattern 1 link training
        drm/i915: Make DP prepare/commit consistent with DP dpms
        drm/i915: Let panel power sequencing hardware do its job
        drm/i915: Treat PCH eDP like DP in most places
        drm/i915: Remove link_status field from intel_dp structure
        drm/i915: Move common PCH_PP_CONTROL setup to ironlake_get_pp_control
        drm/i915: Module parameters using '-1' as default must be signed type
        drm/i915: Turn on another required clock gating bit on gen6.
        drm/i915: Turn on a required 3D clock gating bit on Sandybridge.
        ...
      2d0f2400
    • O
      freezer: fix wait_event_freezable/__thaw_task races · 24b7ead3
      Oleg Nesterov 提交于
      wait_event_freezable() and friends stop the waiting if try_to_freeze()
      fails. This is not right, we can race with __thaw_task() and in this
      case
      
      	- wait_event_freezable() returns the wrong ERESTARTSYS
      
      	- wait_event_freezable_timeout() can return the positive
      	  value while condition == F
      
      Change the code to always check __retval/condition before return.
      
      Note: with or without this patch the timeout logic looks strange,
      probably we should recalc timeout if try_to_freeze() returns T.
      Signed-off-by: NOleg Nesterov <oleg@redhat.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      24b7ead3
    • T
      freezer: kill unused set_freezable_with_signal() · 34b087e4
      Tejun Heo 提交于
      There's no in-kernel user of set_freezable_with_signal() left.  Mixing
      TIF_SIGPENDING with kernel threads can lead to nasty corner cases as
      kernel threads never travel signal delivery path on their own.
      
      e.g. the current implementation is buggy in the cancelation path of
      __thaw_task().  It calls recalc_sigpending_and_wake() in an attempt to
      clear TIF_SIGPENDING but the function never clears it regardless of
      sigpending state.  This means that signallable freezable kthreads may
      continue executing with !freezing() && stuck TIF_SIGPENDING, which can
      be troublesome.
      
      This patch removes set_freezable_with_signal() along with
      PF_FREEZER_NOSIG and recalc_sigpending*() calls in freezer.  User
      tasks get TIF_SIGPENDING, kernel tasks get woken up and the spurious
      sigpending is dealt with in the usual signal delivery path.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NOleg Nesterov <oleg@redhat.com>
      34b087e4
    • T
      dmatest: don't use set_freezable_with_signal() · adfa543e
      Tejun Heo 提交于
      Commit 981ed70d (dmatest: make dmatest threads freezable) made
      dmatest kthread use set_freezable_with_signal(); however, the
      interface is scheduled to be removed in the next merge window.
      
      The problem is that unlike userland tasks there's no default place
      which handles signal pending state and it isn't clear who owns and/or
      is responsible for clearing TIF_SIGPENDING.  For example, in the
      current code, try_to_freeze() clears TIF_SIGPENDING but it isn't sure
      whether it actually owns the TIF_SIGPENDING nor is it race-free -
      ie. the task may continue to run with TIF_SIGPENDING set after the
      freezable section.
      
      Unfortunately, we don't have wait_for_completion_freezable_timeout().
      This patch open codes it and uses wait_event_freezable_timeout()
      instead and removes timeout reloading - wait_event_freezable_timeout()
      won't return across freezing events (currently racy but fix scheduled)
      and timer doesn't decrement while the task is in freezer.  Although
      this does lose timer-reset-over-freezing, given that timeout is
      supposed to be long enough and failure to finish inside is considered
      irrecoverable, I don't think this is worth the complexity.
      
      While at it, move completion to outer scope and explain that we're
      ignoring dangling pointer problem after timeout.  This should give
      slightly better chance at avoiding oops after timeout.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NDan Williams <dan.j.williams@intel.com>
      Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
      Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
      adfa543e
  2. 23 11月, 2011 19 次提交
  3. 22 11月, 2011 12 次提交
    • L
      Merge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · bbbc4791
      Linus Torvalds 提交于
      * 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: fix more ET131X build errors
        staging: et131x depends on NET
        staging: slicoss depends on NET
        linux-next: et131x: Fix build error when CONFIG_PM_SLEEP not enabled
      bbbc4791
    • L
      Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 3c688149
      Linus Torvalds 提交于
      * 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (48 commits)
        USB: Fix Corruption issue in USB ftdi driver ftdi_sio.c
        USB: option: add PID of Huawei E173s 3G modem
        OHCI: final fix for NVIDIA problems (I hope)
        USB: option: release new PID for ZTE 3G modem
        usb: Netlogic: Fix HC_LENGTH call in ehci-xls.c
        USB: storage: ene_ub6250: fix compile warnings
        USB: option: add id for 3G dongle Model VT1000 of Viettel
        USB: serial: pl2303: rm duplicate id
        USB: pch_udc: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor
        USB: pch_udc: Support new device LAPIS Semiconductor ML7831 IOH
        usb-storage: Accept 8020i-protocol commands longer than 12 bytes
        USB: quirks: adding more quirky webcams to avoid squeaky audio
        powerpc/usb: fix type cast for address of ioremap to compatible with 64-bit
        USB: at91: at91-ohci: fix set/get power
        USB: cdc-acm: Fix disconnect() vs close() race
        USB: add quirk for Logitech C600 web cam
        USB: EHCI: fix HUB TT scheduling issue with iso transfer
        USB: XHCI: resume root hubs when the controller resumes
        USB: workaround for bug in old version of GCC
        USB: ark3116 initialisation fix
        ...
      3c688149
    • L
      Merge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 3b9abc7e
      Linus Torvalds 提交于
      * 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        TTY: ldisc, wait for ldisc infinitely in hangup
        TTY: ldisc, move wait idle to caller
        TTY: ldisc, allow waiting for ldisc arbitrarily long
        Revert "tty/serial: Prevent drop of DCD on suspend for Tegra UARTs"
        RS485: fix inconsistencies in the meaning of some variables
        pch_uart: Fix DMA resource leak issue
        serial,mfd: Fix CMSPAR setup
        tty/serial: Prevent drop of DCD on suspend for Tegra UARTs
        pch_uart: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor
        pch_uart: Support new device LAPIS Semiconductor ML7831 IOH
        pch_uart: Fix hw-flow control issue
        tty: hvc_dcc: Fix duplicate character inputs
        jsm: Change maintainership
      3b9abc7e
    • L
      Merge branch 'driver-core-linus' of... · 0cda5696
      Linus Torvalds 提交于
      Merge branch 'driver-core-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      * 'driver-core-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        drivers/base/node.c: fix compilation error with older versions of gcc
        uio: documentation fixups
        device.h: Fix struct member documentation
      0cda5696
    • L
      Merge branch 'char-misc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · b0d81664
      Linus Torvalds 提交于
      * 'char-misc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        misc: ad525x_dpot: Fix AD8400 spi transfer size.
        pch_phub: Fix MAC address writing issue for LAPIS ML7831
        pch_phub: Improve ADE(Address Decode Enable) control
        pch_phub: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor
        pch_phub: Support new device LAPIS Semiconductor ML7831 IOH
        pcie-gadget-spear: Add "platform:" prefix for platform modalias
        MAINTAINERS: add CHAR and MISC driver maintainers
      b0d81664
    • A
      iio: fix a leak due to improper use of anon_inode_getfd() · b4641336
      Al Viro 提交于
      it can fail and in that case ->release() will *not* be called...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      b4641336
    • A
      microblaze: bury asm/namei.h · c332c10c
      Al Viro 提交于
      altroot support has been gone for years, along with arch/*/asm/namei.h;
      looks like a dummy survivor that sat it out in microblaze tree...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      c332c10c
    • T
      usb_storage: don't use set_freezable_with_signal() · ec012476
      Tejun Heo 提交于
      The current implementation of set_freezable_with_signal() is buggy and
      tricky to get right.  usb-storage is the only user and its use can be
      avoided trivially.
      
      All usb-storage wants is to be able to sleep with timeout and get
      woken up if freezing() becomes true.  This can be trivially
      implemented by doing interruptible wait w/ freezing() included in the
      wait condition.  There's no reason to use set_freezable_with_signal().
      
      Perform interruptible wait on freezing() instead of using
      set_freezable_with_signal(), which is scheduled for removal.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Seth Forshee <seth.forshee@canonical.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      ec012476
    • T
      freezer: remove unused @sig_only from freeze_task() · 839e3407
      Tejun Heo 提交于
      After "freezer: make freezing() test freeze conditions in effect
      instead of TIF_FREEZE", freezing() returns authoritative answer on
      whether the current task should freeze or not and freeze_task()
      doesn't need or use @sig_only.  Remove it.
      
      While at it, rewrite function comment for freeze_task() and rename
      @sig_only to @user_only in try_to_freeze_tasks().
      
      This patch doesn't cause any functional change.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NOleg Nesterov <oleg@redhat.com>
      839e3407
    • T
      freezer: use lock_task_sighand() in fake_signal_wake_up() · 37ad8aca
      Tejun Heo 提交于
      cgroup_freezer calls freeze_task() without holding tasklist_lock and,
      if the task is exiting, its ->sighand may be gone by the time
      fake_signal_wake_up() is called.  Use lock_task_sighand() instead of
      accessing ->sighand directly.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NOleg Nesterov <oleg@redhat.com>
      Acked-by: NOleg Nesterov <oleg@redhat.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Paul Menage <paul@paulmenage.org>
      37ad8aca
    • T
      freezer: restructure __refrigerator() · 5ece3eae
      Tejun Heo 提交于
      If another freeze happens before all tasks leave FROZEN state after
      being thawed, the freezer can see the existing FROZEN and consider the
      tasks to be frozen but they can clear FROZEN without checking the new
      freezing().
      
      Oleg suggested restructuring __refrigerator() such that there's single
      condition check section inside freezer_lock and sigpending is cleared
      afterwards, which fixes the problem and simplifies the code.
      Restructure accordingly.
      
      -v2: Frozen loop exited without releasing freezer_lock.  Fixed.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NOleg Nesterov <oleg@redhat.com>
      Acked-by: NOleg Nesterov <oleg@redhat.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      5ece3eae
    • T
      freezer: fix set_freezable[_with_signal]() race · 96ee6d85
      Tejun Heo 提交于
      A kthread doing set_freezable*() may race with on-going PM freeze and
      the freezer might think all tasks are frozen while the new freezable
      kthread is merrily proceeding to execute code paths which aren't
      supposed to be executing during PM freeze.
      
      Reimplement set_freezable[_with_signal]() using __set_freezable() such
      that freezable PF flags are modified under freezer_lock and
      try_to_freeze() is called afterwards.  This eliminates race condition
      against freezing.
      
      Note: Separated out from larger patch to resolve fix order dependency
            Oleg pointed out.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      96ee6d85