1. 25 1月, 2012 1 次提交
    • D
      x86: xen: size struct xen_spinlock to always fit in arch_spinlock_t · 7a7546b3
      David Vrabel 提交于
      If NR_CPUS < 256 then arch_spinlock_t is only 16 bits wide but struct
      xen_spinlock is 32 bits.  When a spin lock is contended and
      xl->spinners is modified the two bytes immediately after the spin lock
      would be corrupted.
      
      This is a regression caused by 84eb950d
      (x86, ticketlock: Clean up types and accessors) which reduced the size
      of arch_spinlock_t.
      
      Fix this by making xl->spinners a u8 if NR_CPUS < 256.  A
      BUILD_BUG_ON() is also added to check the sizes of the two structures
      are compatible.
      
      In many cases this was not noticable as there would often be padding
      bytes after the lock (e.g., if any of CONFIG_GENERIC_LOCKBREAK,
      CONFIG_DEBUG_SPINLOCK, or CONFIG_DEBUG_LOCK_ALLOC were enabled).
      
      The bnx2 driver is affected. In struct bnx2, phy_lock and
      indirect_lock may have no padding after them.  Contention on phy_lock
      would corrupt indirect_lock making it appear locked and the driver
      would deadlock.
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      Signed-off-by: NJeremy Fitzhardinge <jeremy@goop.org>
      Acked-by: NIan Campbell <ian.campbell@citrix.com>
      CC: stable@kernel.org #only 3.2
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      7a7546b3
  2. 13 1月, 2012 2 次提交
    • K
      xen/balloon: Move the registration from device to subsystem. · 8ea11f7f
      Konrad Rzeszutek Wilk 提交于
      With git commit 07068021
      "xen-balloon: convert sysdev_class to a regular subsystem" we would
      end up with the attributes being put in:
      
       /sys/devices/xen_memory0/target_kb
      instead of
      /sys/devices/system/xen_memory/xen_memory0/target_kb
      
      Making the tools inable to deflate the kernel to make more space
      for launching another guest and printing:
      Error: Failed to query current memory allocation of dom0
      Reported-by: NSander Eikelenboom <linux@eikelenboom.it>
      Suggested-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      8ea11f7f
    • K
      Merge commit '07068021' into stable/for-linus-fixes-3.3 · d3b7737f
      Konrad Rzeszutek Wilk 提交于
      * commit '07068021': (50 commits)
        xen-balloon: convert sysdev_class to a regular subsystem
        clocksource: convert sysdev_class to a regular subsystem
        ibm_rtl: convert sysdev_class to a regular subsystem
        edac: convert sysdev_class to a regular subsystem
        rtmutex-tester: convert sysdev_class to a regular subsystem
        driver-core: implement 'sysdev' functionality for regular devices and buses
        kref: fix up the kfree build problems
        kref: Remove the memory barriers
        kref: Implement kref_put in terms of kref_sub
        kref: Inline all functions
        Drivers: hv: Get rid of an unnecessary check in hv.c
        Drivers: hv: Make the vmbus driver unloadable
        Drivers: hv: Fix a memory leak
        Documentation: Update stable address
        MAINTAINERS: stable: Update address
        w1: add fast search for single slave bus
        driver-core: skip uevent generation when nobody is listening
        drivers: hv: Don't OOPS when you cannot init vmbus
        firmware: google: fix gsmi.c build warning
        drivers_base: make argument to platform_device_register_full const
        ...
      d3b7737f
  3. 10 1月, 2012 1 次提交
  4. 15 12月, 2011 7 次提交
  5. 14 12月, 2011 3 次提交
    • P
      kref: Remove the memory barriers · 3c8ed889
      Peter Zijlstra 提交于
      Commit 1b0b3b99 ("kref: fix CPU ordering with respect to krefs")
      wrongly adds memory barriers to kref.
      
      It states:
      
        some atomic operations are only atomic, not ordered. Thus a CPU is allowed
        to reorder memory references to an object to before the reference is
        obtained. This fixes it.
      
      While true, it fails to show why this is a problem. I say it is not a
      problem because if there is a race with kref_put() such that we could
      end up referencing a free'd object without this memory barrier, we
      would still have that race with the memory barrier.
      
      The kref_put() in question could complete (and free the object) before
      the atomic_inc() and we'd still be up shit creek.
      
      The kref_init() case is even worse, if your object is published at this
      time you're so wrong the memory barrier won't make a difference what
      so ever. If its not published, the act of publishing should include
      the needed barriers/locks to make sure all writes prior to the act of
      publishing are complete such that others will only observe a complete
      object.
      
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Oliver Neukum <oneukum@suse.de>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3c8ed889
    • P
      kref: Implement kref_put in terms of kref_sub · 47dbd7d9
      Peter Zijlstra 提交于
      Less lines of code is better.
      
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      47dbd7d9
    • P
      kref: Inline all functions · 4af679cd
      Peter Zijlstra 提交于
      These are tiny functions, there's no point in having them out-of-line.
      
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/n/tip-8eccvi2ur2fzgi00xdjlbf5z@git.kernel.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4af679cd
  6. 13 12月, 2011 5 次提交
  7. 10 12月, 2011 5 次提交
  8. 29 11月, 2011 1 次提交
    • T
      Merge branch 'master' into x86/memblock · d4bbf7e7
      Tejun Heo 提交于
      Conflicts & resolutions:
      
      * arch/x86/xen/setup.c
      
      	dc91c728 "xen: allow extra memory to be in multiple regions"
      	24aa0788 "memblock, x86: Replace memblock_x86_reserve/free..."
      
      	conflicted on xen_add_extra_mem() updates.  The resolution is
      	trivial as the latter just want to replace
      	memblock_x86_reserve_range() with memblock_reserve().
      
      * drivers/pci/intel-iommu.c
      
      	166e9278 "x86/ia64: intel-iommu: move to drivers/iommu/"
      	5dfe8660 "bootmem: Replace work_with_active_regions() with..."
      
      	conflicted as the former moved the file under drivers/iommu/.
      	Resolved by applying the chnages from the latter on the moved
      	file.
      
      * mm/Kconfig
      
      	66616720 "memblock: add NO_BOOTMEM config symbol"
      	c378ddd5 "memblock, x86: Make ARCH_DISCARD_MEMBLOCK a config option"
      
      	conflicted trivially.  Both added config options.  Just
      	letting both add their own options resolves the conflict.
      
      * mm/memblock.c
      
      	d1f0ece6 "mm/memblock.c: small function definition fixes"
      	ed7b56a7 "memblock: Remove memblock_memory_can_coalesce()"
      
      	confliected.  The former updates function removed by the
      	latter.  Resolution is trivial.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      d4bbf7e7
  9. 28 11月, 2011 2 次提交
  10. 27 11月, 2011 8 次提交
  11. 26 11月, 2011 2 次提交
  12. 25 11月, 2011 2 次提交
  13. 24 11月, 2011 1 次提交