1. 26 12月, 2011 4 次提交
  2. 25 12月, 2011 3 次提交
  3. 24 12月, 2011 9 次提交
  4. 23 12月, 2011 18 次提交
  5. 22 12月, 2011 6 次提交
    • X
      vmwgfx: fix incorrect VRAM size check in vmw_kms_fb_create() · 8a783896
      Xi Wang 提交于
      Commit e133e737 didn't correctly fix the integer overflow issue.
      
      -	unsigned int required_size;
      +	u64 required_size;
      	...
      	required_size = mode_cmd->pitch * mode_cmd->height;
      -	if (unlikely(required_size > dev_priv->vram_size)) {
      +	if (unlikely(required_size > (u64) dev_priv->vram_size)) {
      
      Note that both pitch and height are u32.  Their product is still u32 and
      would overflow before being assigned to required_size.  A correct way is
      to convert pitch and height to u64 before the multiplication.
      
      	required_size = (u64)mode_cmd->pitch * (u64)mode_cmd->height;
      
      This patch calls the existing vmw_kms_validate_mode_vram() for
      validation.
      Signed-off-by: NXi Wang <xi.wang@gmail.com>
      Reviewed-and-tested-by: NThomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      8a783896
    • A
      drm/radeon/kms: bail on BTC parts if MC ucode is missing · 77e00f2e
      Alex Deucher 提交于
      We already do this for cayman, need to also do it for
      BTC parts.  The default memory and voltage setup is not
      adequate for advanced operation.  Continuing will
      result in an unusable display.
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@kernel.org
      Cc: Jean Delvare <khali@linux-fr.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      77e00f2e
    • S
      VFS: Fix race between CPU hotplug and lglocks · e30e2fdf
      Srivatsa S. Bhat 提交于
      Currently, the *_global_[un]lock_online() routines are not at all synchronized
      with CPU hotplug. Soft-lockups detected as a consequence of this race was
      reported earlier at https://lkml.org/lkml/2011/8/24/185. (Thanks to Cong Meng
      for finding out that the root-cause of this issue is the race condition
      between br_write_[un]lock() and CPU hotplug, which results in the lock states
      getting messed up).
      
      Fixing this race by just adding {get,put}_online_cpus() at appropriate places
      in *_global_[un]lock_online() is not a good option, because, then suddenly
      br_write_[un]lock() would become blocking, whereas they have been kept as
      non-blocking all this time, and we would want to keep them that way.
      
      So, overall, we want to ensure 3 things:
      1. br_write_lock() and br_write_unlock() must remain as non-blocking.
      2. The corresponding lock and unlock of the per-cpu spinlocks must not happen
         for different sets of CPUs.
      3. Either prevent any new CPU online operation in between this lock-unlock, or
         ensure that the newly onlined CPU does not proceed with its corresponding
         per-cpu spinlock unlocked.
      
      To achieve all this:
      (a) We introduce a new spinlock that is taken by the *_global_lock_online()
          routine and released by the *_global_unlock_online() routine.
      (b) We register a callback for CPU hotplug notifications, and this callback
          takes the same spinlock as above.
      (c) We maintain a bitmap which is close to the cpu_online_mask, and once it is
          initialized in the lock_init() code, all future updates to it are done in
          the callback, under the above spinlock.
      (d) The above bitmap is used (instead of cpu_online_mask) while locking and
          unlocking the per-cpu locks.
      
      The callback takes the spinlock upon the CPU_UP_PREPARE event. So, if the
      br_write_lock-unlock sequence is in progress, the callback keeps spinning,
      thus preventing the CPU online operation till the lock-unlock sequence is
      complete. This takes care of requirement (3).
      
      The bitmap that we maintain remains unmodified throughout the lock-unlock
      sequence, since all updates to it are managed by the callback, which takes
      the same spinlock as the one taken by the lock code and released only by the
      unlock routine. Combining this with (d) above, satisfies requirement (2).
      
      Overall, since we use a spinlock (mentioned in (a)) to prevent CPU hotplug
      operations from racing with br_write_lock-unlock, requirement (1) is also
      taken care of.
      
      By the way, it is to be noted that a CPU offline operation can actually run
      in parallel with our lock-unlock sequence, because our callback doesn't react
      to notifications earlier than CPU_DEAD (in order to maintain our bitmap
      properly). And this means, since we use our own bitmap (which is stale, on
      purpose) during the lock-unlock sequence, we could end up unlocking the
      per-cpu lock of an offline CPU (because we had locked it earlier, when the
      CPU was online), in order to satisfy requirement (2). But this is harmless,
      though it looks a bit awkward.
      Debugged-by: NCong Meng <mc@linux.vnet.ibm.com>
      Signed-off-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Cc: stable@vger.kernel.org
      e30e2fdf
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · ecefc36b
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        net: Add a flow_cache_flush_deferred function
        ipv4: reintroduce route cache garbage collector
        net: have ipconfig not wait if no dev is available
        sctp: Do not account for sizeof(struct sk_buff) in estimated rwnd
        asix: new device id
        davinci-cpdma: fix locking issue in cpdma_chan_stop
        sctp: fix incorrect overflow check on autoclose
        r8169: fix Config2 MSIEnable bit setting.
        llc: llc_cmsg_rcv was getting called after sk_eat_skb.
        net: bpf_jit: fix an off-one bug in x86_64 cond jump target
        iwlwifi: update SCD BC table for all SCD queues
        Revert "Bluetooth: Revert: Fix L2CAP connection establishment"
        Bluetooth: Clear RFCOMM session timer when disconnecting last channel
        Bluetooth: Prevent uninitialized data access in L2CAP configuration
        iwlwifi: allow to switch to HT40 if not associated
        iwlwifi: tx_sync only on PAN context
        mwifiex: avoid double list_del in command cancel path
        ath9k: fix max phy rate at rate control init
        nfc: signedness bug in __nci_request()
        iwlwifi: do not set the sequence control bit is not needed
      ecefc36b
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · d5ed5e48
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: atmel/ac97c: using software reset instead hardware reset if not available
      d5ed5e48
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 · 0703c680
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
        mfd: Include linux/io.h to jz4740-adc
        mfd: Use request_threaded_irq for twl4030-irq instead of irq_set_chained_handler
        mfd: Base interrupt for twl4030-irq must be one-shot
        mfd: Handle tps65910 clear-mask correctly
        mfd: add #ifdef CONFIG_DEBUG_FS guard for ab8500_debug_resources
        mfd: Fix twl-core oops while calling twl_i2c_* for unbound driver
        mfd: include linux/module.h for ab5500-debugfs
        mfd: Update wm8994 active device checks for WM1811
        mfd: Set tps6586x bits if new value is different from the old one
        mfd: Set da903x bits if new value is different from the old one
        mfd: Set adp5520 bits if new value is different from the old one
        mfd: Add missed free_irq in da903x_remove
      0703c680