Skip to content
  1. Jun 08, 2011
    • Thomas Gleixner's avatar
      x86: cpu-hotplug: Prevent softirq wakeup on wrong CPU · fd8a7de1
      Thomas Gleixner authored
      
      
      After a newly plugged CPU sets the cpu_online bit it enables
      interrupts and goes idle. The cpu which brought up the new cpu waits
      for the cpu_online bit and when it observes it, it sets the cpu_active
      bit for this cpu. The cpu_active bit is the relevant one for the
      scheduler to consider the cpu as a viable target.
      
      With forced threaded interrupt handlers which imply forced threaded
      softirqs we observed the following race:
      
      cpu 0                         cpu 1
      
      bringup(cpu1);
                                    set_cpu_online(smp_processor_id(), true);
      		              local_irq_enable();
      while (!cpu_online(cpu1));
                                    timer_interrupt()
                                      -> wake_up(softirq_thread_cpu1);
                                           -> enqueue_on(softirq_thread_cpu1, cpu0);
      
                                                                              ^^^^
      
      cpu_notify(CPU_ONLINE, cpu1);
        -> sched_cpu_active(cpu1)
           -> set_cpu_active((cpu1, true);
      
      When an interrupt happens before the cpu_active bit is set by the cpu
      which brought up the newly onlined cpu, then the scheduler refuses to
      enqueue the woken thread which is bound to that newly onlined cpu on
      that newly onlined cpu due to the not yet set cpu_active bit and
      selects a fallback runqueue. Not really an expected and desirable
      behaviour.
      
      So far this has only been observed with forced hard/softirq threading,
      but in theory this could happen without forced threaded hard/softirqs
      as well. It's probably unobservable as it would take a massive
      interrupt storm on the newly onlined cpu which causes the softirq loop
      to wake up the softirq thread and an even longer delay of the cpu
      which waits for the cpu_online bit.
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Cc: stable@kernel.org # 2.6.39
      fd8a7de1
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of... · cb0a02ec
      Linus Torvalds authored
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        genirq: Ensure we locate the passed IRQ in irq_alloc_descs()
        genirq: Fix descriptor init on non-sparse IRQs
        irq: Handle spurios irq detection for threaded irqs
        genirq: Print threaded handler in spurious debug output
      cb0a02ec
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of... · d681f120
      Linus Torvalds authored
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        x86/amd-iommu: Fix boot crash with hidden PCI devices
        x86/amd-iommu: Use only per-device dma_ops
        x86/amd-iommu: Fix 3 possible endless loops
      d681f120
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of... · 6715a52a
      Linus Torvalds authored
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        sched: Fix/clarify set_task_cpu() locking rules
        lockdep: Fix lock_is_held() on recursion
        sched: Fix schedstat.nr_wakeups_migrate
        sched: Fix cross-cpu clock sync on remote wakeups
      6715a52a
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 · ef239801
      Linus Torvalds authored
      * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
        drm/nv40: fall back to paged dma object for the moment
        drm/nouveau: fix leak of gart mm node
        drm/nouveau: fix vram page mapping when crossing page table boundaries
        drm/nv17-nv40: Fix modesetting failure when pitch == 4096px (fdo bug 35901).
        drm/nouveau: don't create accel engine objects when noaccel=1
        drm/nvc0: recognise 0xdX chipsets as NV_C0
        drm/i915: Add a no lvds quirk for the Asus EeeBox PC EB1007
        drm/i915: Share the common force-audio property between connectors
        drm/i915: Remove unused enum "chip_family"
        drm/915: fix relaxed tiling on gen2: tile height
        drm/i915/crt: Explicitly return false if connected to a digital monitor
        drm/i915: Replace ironlake_compute_wm0 with g4x_compute_wm0
        drm/i915: Only print out the actual number of fences for i915_error_state
        drm/i915: s/addr & ~PAGE_MASK/offset_in_page(addr)/
        drm: i915: correct return status in intel_hdmi_mode_valid()
        drm/i915: fix regression after clock gating init split
        drm/i915: fix if statement in ivybridge irq handler
      ef239801
    • Linus Torvalds's avatar
      Merge branch 'drm-radeon-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 · 12871a0b
      Linus Torvalds authored
      * 'drm-radeon-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
        drm/radeon/kms/atom: fix PHY init
        drm/radeon/kms: add missing Evergreen texture formats to the CS parser
        drm/radeon/kms: viewport height has to be even
        drm/radeon/kms: remove duplicate reg from r600 safe regs
        drm/radeon/kms: add support for Llano Fusion APUs
        drm/radeon/kms: add llano pci ids
        drm/radeon/kms: fill in asic struct for llano
        drm/radeon/kms: add family ids for llano APUs
        drm/radeon: fix oops in ttm reserve when pageflipping (v2)
        drm/radeon/kms: clean up the radeon kms Kconfig
        drm/radeon/kms: fix thermal sensor reading on juniper
        drm/radeon/kms: add missing case for cayman thermal sensor
        drm/radeon/kms: add blit support for cayman (v2)
        drm/radeon/kms/blit: workaround some hw issues on evergreen+
      12871a0b
    • Linus Torvalds's avatar
      Merge branch 'timers-fixes-for-linus' of... · ecff4fcc
      Linus Torvalds authored
      Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        timers: Consider slack value in mod_timer()
        clockevents: Handle empty cpumask gracefully
      ecff4fcc
    • Linus Torvalds's avatar
      Merge branch 'kvm-updates/3.0' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 58a9a36b
      Linus Torvalds authored
      * 'kvm-updates/3.0' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: Initialize kvm before registering the mmu notifier
        KVM: x86: use proper port value when checking io instruction permission
        KVM: add missing void __user * cast to access_ok() call
      58a9a36b
    • Grant Likely's avatar
      MAINTAINERS: Saying goodbye to David Brownell · 22b174f8
      Grant Likely authored
      
      
      We had to say goodbye when David passed away recently.  David had a
      huge impact on our community, both personally in the lives of the
      people he worked with, and technically in the design and maintenance
      of several subsystems.  He is greatly missed.
      
      He also leaves behind a number of much loved subsystems now orphaned.
      This patch updates the MAINTAINERS file for the areas that David was
      responsible for and adds an entry for him to the CREDITS file.
      
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Acked-by: default avatarHarry Wei <harryxiyou@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      22b174f8
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6 · 9c125d2a
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6:
        fat: Fix corrupt inode flags when remove ATTR_SYS flag
      9c125d2a
    • David Howells's avatar
      MN10300: Add missing _sdata declaration · 40182373
      David Howells authored
      _sdata needs to be declared in the linker script now as of commit
      a2d063ac
      
       ("extable, core_kernel_data(): Make sure all archs define
      _sdata")
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      40182373
    • David Howells's avatar
      MN10300: die_if_no_fixup() shouldn't use get_user() as it doesn't call set_fs() · db1c9dfa
      David Howells authored
      
      
      die_if_no_fixup() shouldn't use get_user() as it doesn't call set_fs() to
      indicate that it wants to probe a kernel address.  Instead it should use
      probe_kernel_read().
      
      This fixes the problem of gdb seeing SIGILL rather than SIGTRAP when hitting
      the KGDB special breakpoint upon SysRq+g being seen.  The problem was that
      die_if_no_fixup() was failing to read the opcode of the instruction that caused
      the exception, and thus not fixing up the exception.
      
      This caused gdb to get a S04 response to the $? request in its remote protocol
      rather than S05 - which would then cause it to continue with $C04 rather than
      $c in an attempt to pass the signal onto the inferior process.  The kernel,
      however, does not support $Cnn, and so objects by returning an E22 response,
      indicating an error.  gdb does not expect this and prints:
      
      	warning: Remote failure reply: E22
      
      and then returns to the gdb command prompt unable to continue.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      db1c9dfa
    • David Howells's avatar
      MN10300: Fix one of the kernel debugger cacheflush variants · 2e65d1f6
      David Howells authored
      
      
      One of the kernel debugger cacheflush variants escaped proper testing.  Two of
      the labels are wrong, being derived from the code that was copied to construct
      the variant.
      
      The first label results in the following assembler message:
      
          AS      arch/mn10300/mm/cache-dbg-flush-by-reg.o
        arch/mn10300/mm/cache-dbg-flush-by-reg.S: Assembler messages:
        arch/mn10300/mm/cache-dbg-flush-by-reg.S:123: Error: symbol `debugger_local_cache_flushinv_no_dcache' is already defined
      
      And the second label results in the following linker message:
      
        arch/mn10300/mm/built-in.o:(.text+0x1d39): undefined reference to `mn10300_local_icache_inv_range_reg_end'
        arch/mn10300/mm/built-in.o:(.text+0x1d39): relocation truncated to fit: R_MN10300_PCREL16 against undefined symbol `mn10300_local_icache_inv_range_reg_end'
      
      To test this file the following configuration pieces must be set:
      
      	CONFIG_AM34=y
      	CONFIG_MN10300_CACHE_WBACK=y
      	CONFIG_MN10300_DEBUGGER_CACHE_FLUSH_BY_REG=y
      	CONFIG_MN10300_CACHE_MANAGE_BY_REG=y
      	CONFIG_AM34_HAS_CACHE_SNOOP=n
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2e65d1f6
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6 · aec040e2
      Linus Torvalds authored
      * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
        [S390] fix kvm defines for 31 bit compile
        [S390] use generic RCU page-table freeing code
        [S390] qdio: Split SBAL entry flags
        [S390] kvm-s390: fix stfle facilities numbers >=64
        [S390] kvm-s390: Fix host crash on misbehaving guests
      aec040e2
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 · 8ea656bd
      Linus Torvalds authored
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (21 commits)
        ARM: OMAP4: MMC: increase delay for pbias
        arm: omap2plus: move NAND_BLOCK_SIZE out of boards
        omap4: hwmod: Enable the keypad
        omap3: Free Beagle rev gpios when they are read, so others can read them later
        arm: omap3: beagle: Ensure msecure is mux'd to be able to set the RTC
        omap: rx51: Don't power up speaker amplifier at bootup
        omap: rx51: Set regulator V28_A always on
        ARM: OMAP4: MMC: no regulator off during probe for eMMC
        arm: omap2plus: fix ads7846 pendown gpio request
        ARM: OMAP2: Add missing iounmap in omap4430_phy_init
        ARM: omap4: Pass core and wakeup mux tables to omap4_mux_init
        ARM: omap2+: mux: Allow board mux settings to be NULL
        OMAP4: fix return value of omap4_l3_init
        OMAP: iovmm: fix SW flags passed by user
        arch/arm/mach-omap1/dma.c: Invert calls to platform_device_put and platform_device_del
        OMAP2+: mux: fix compilation warnings
        OMAP: SRAM: Fix warning: format '%08lx' expects type 'long unsigned int'
        arm: omap3: cm-t3517: fix section mismatch warning
        OMAP2+: Fix 9 section mismatch(es) warnings from mach-omap2/built-in.o
        ARM: OMAP2: Add missing include of linux/gpio.h
        ...
      8ea656bd
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes · d205df99
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
        GFS2: Processes waiting on inode glock that no processes are holding
      d205df99
    • Linus Torvalds's avatar
      Merge branch 'fbdev-fixes-for-linus' of... · 24210071
      Linus Torvalds authored
      Merge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-3.x
      
      * 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-3.x:
        video: Fix use-after-free by vga16fb on rmmod
        video: Convert vmalloc/memset to vzalloc
        efifb: Disallow manual bind and unbind
        efifb: Fix mismatched request/release_mem_region
        efifb: Enable write-combining
        drivers/video/pxa168fb.c: add missing clk_put
        drivers/video/imxfb.c: add missing clk_put
        fbdev: bf537-lq035: add missing blacklight properties type
        savagefb: Use panel CVT mode as default
        fbdev: sh_mobile_lcdcfb: Fix up fallout from MERAM changes.
      24210071
    • Linus Torvalds's avatar
      Merge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 · 83973451
      Linus Torvalds authored
      * 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
        vfs: make unlink() and rmdir() return ENOENT in preference to EROFS
        lmLogOpen() broken failure exit
        usb: remove bad dput after dentry_unhash
        more conservative S_NOSEC handling
      83973451
  2. Jun 07, 2011
  3. Jun 06, 2011
    • Joerg Roedel's avatar
      x86/amd-iommu: Use only per-device dma_ops · 27c2127a
      Joerg Roedel authored
      
      
      Unfortunatly there are systems where the AMD IOMMU does not
      cover all devices. This breaks with the current driver as it
      initializes the global dma_ops variable. This patch limits
      the AMD IOMMU to the devices listed in the IVRS table fixing
      DMA for devices not covered by the IOMMU.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
      27c2127a
    • Joerg Roedel's avatar
      x86/amd-iommu: Fix 3 possible endless loops · 0de66d5b
      Joerg Roedel authored
      
      
      The driver contains several loops counting on an u16 value
      where the exit-condition is checked against variables that
      can have values up to 0xffff. In this case the loops will
      never exit. This patch fixed 3 such loops.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
      0de66d5b
    • Martin Schwidefsky's avatar
      [S390] fix kvm defines for 31 bit compile · 6c61cfe9
      Martin Schwidefsky authored
      
      
      KVM is not available for 31 bit but the KVM defines cause warnings:
      
      arch/s390/include/asm/pgtable.h: In function 'ptep_test_and_clear_user_dirty':
      arch/s390/include/asm/pgtable.h:817: warning: integer constant is too large for 'unsigned long' type
      arch/s390/include/asm/pgtable.h:818: warning: integer constant is too large for 'unsigned long' type
      arch/s390/include/asm/pgtable.h: In function 'ptep_test_and_clear_user_young':
      arch/s390/include/asm/pgtable.h:837: warning: integer constant is too large for 'unsigned long' type
      arch/s390/include/asm/pgtable.h:838: warning: integer constant is too large for 'unsigned long' type
      
      Add 31 bit versions of the KVM defines to remove the warnings.
      
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      6c61cfe9
    • Martin Schwidefsky's avatar
      [S390] use generic RCU page-table freeing code · 36409f63
      Martin Schwidefsky authored
      
      
      Replace the s390 specific rcu page-table freeing code with the
      generic variant. This requires to duplicate the definition for the
      struct mmu_table_batch as s390 does not use the generic tlb flush
      code.
      
      While we are at it remove the restriction that page table fragments
      can not be reused after a single fragment has been freed with rcu
      and split out allocation and freeing of page tables with pgstes.
      
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      36409f63
    • Jan Glauber's avatar
      [S390] qdio: Split SBAL entry flags · 3ec90878
      Jan Glauber authored
      
      
      The qdio SBAL entry flag is made-up of four different values that are
      independent of one another. Some of the bits are reserved by the
      hardware and should not be changed by qdio. Currently all four values
      are overwritten since the SBAL entry flag is defined as an u32.
      
      Split the SBAL entry flag into four u8's as defined by the hardware
      and don't touch the reserved bits.
      
      Signed-off-by: default avatarJan Glauber <jang@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      3ec90878
    • Christian Borntraeger's avatar
      [S390] kvm-s390: fix stfle facilities numbers >=64 · 9950f8be
      Christian Borntraeger authored
      
      
      Currently KVM masks out the known good facilities only for the first
      double word, but passed the 2nd double word without filtering. This
      breaks some code on newer systems:
      
      [    0.593966] ------------[ cut here ]------------
      [    0.594086] WARNING: at arch/s390/oprofile/hwsampler.c:696
      [    0.594213] Modules linked in:
      [    0.594321] Modules linked in:
      [    0.594439] CPU: 0 Not tainted 3.0.0-rc1 #46
      [    0.594564] Process swapper (pid: 1, task: 00000001effa8038, ksp: 00000001effafab8)
      [    0.594735] Krnl PSW : 0704100180000000 00000000004ab89a (hwsampler_setup+0x75a/0x7b8)
      [    0.594910]            R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0 EA:3
      [    0.595120] Krnl GPRS: ffffffff00000000 00000000ffffffea ffffffffffffffea 00000000004a98f8
      [    0.595351]            00000000004aa002 0000000000000001 000000000080e720 000000000088b9f8
      [    0.595522]            000000000080d3e8 0000000000000000 0000000000000000 000000000080e464
      [    0.595725]            0000000000000000 00000000005db198 00000000004ab3a2 00000001effafd98
      [    0.595901] Krnl Code: 00000000004ab88c: c0e5000673ca        brasl   %r14,57a020
      [    0.596071]            00000000004ab892: a7f4fc77            brc     15,4ab180
      [    0.596276]            00000000004ab896: a7f40001            brc     15,4ab898
      [    0.596454]           >00000000004ab89a: a7c8ffa1            lhi     %r12,-95
      [    0.596657]            00000000004ab89e: a7f4fc71            brc     15,4ab180
      [    0.596854]            00000000004ab8a2: a7f40001            brc     15,4ab8a4
      [    0.597029]            00000000004ab8a6: a7f4ff22            brc     15,4ab6ea
      [    0.597230]            00000000004ab8aa: c0200011009a        larl    %r2,6cb9de
      [    0.597441] Call Trace:
      [    0.597511] ([<00000000004ab3a2>] hwsampler_setup+0x262/0x7b8)
      [    0.597676]  [<0000000000875812>] oprofile_arch_init+0x32/0xd0
      [    0.597834]  [<0000000000875788>] oprofile_init+0x28/0x74
      [    0.597991]  [<00000000001001be>] do_one_initcall+0x3a/0x170
      [    0.598151]  [<000000000084fa22>] kernel_init+0x142/0x1ec
      [    0.598314]  [<000000000057db16>] kernel_thread_starter+0x6/0xc
      [    0.598468]  [<000000000057db10>] kernel_thread_starter+0x0/0xc
      [    0.598606] Last Breaking-Event-Address:
      [    0.598707]  [<00000000004ab896>] hwsampler_setup+0x756/0x7b8
      [    0.598863] ---[ end trace ce3179037f4e3e5b ]---
      
      So lets also mask the 2nd double word. Facilites 66,76,76,77 should be fine.
      
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      9950f8be
    • Christian Borntraeger's avatar
      [S390] kvm-s390: Fix host crash on misbehaving guests · a578b37c
      Christian Borntraeger authored
      commit 9ff4cfb3 ([S390] kvm-390: Let
      kernel exit SIE instruction on work) fixed a problem of commit
      commit cd3b70f5
      
       ([S390] virtualization
      aware cpu measurement) but uncovered another one.
      
      If a kvm guest accesses guest real memory that doesnt exist, the
      page fault handler calls the sie hook, which then rewrites
      the return psw from sie_inst to either sie_exit or sie_reenter.
      On return, the page fault handler will then detect the wrong access
      as a kernel fault causing a kernel oops in sie_reenter or sie_exit.
      
      We have to add these two addresses to the exception  table to allow
      graceful exits.
      
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      a578b37c
    • Bruno Prémont's avatar
      video: Fix use-after-free by vga16fb on rmmod · a50d28de
      Bruno Prémont authored
      
      
      Since fb_info is now refcounted and thus may get freed at any time it
      gets unregistered module unloading will try to unregister framebuffer
      as stored in platform data on probe though this pointer may
      be stale.
      
      Cleanup platform data on framebuffer release.
      
      CC: stable@kernel.org
      Signed-off-by: default avatarBruno Prémont <bonbons@linux-vserver.org>
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      a50d28de
    • Linus Torvalds's avatar
      Linux 3.0-rc2 · 59c5f46f
      Linus Torvalds authored
      59c5f46f