1. 25 10月, 2012 1 次提交
  2. 24 10月, 2012 12 次提交
    • D
      x86/irq/ioapic: Check for valid irq_cfg pointer in smp_irq_move_cleanup_interrupt · 94777fc5
      Dimitri Sivanich 提交于
      Posting this patch to fix an issue concerning sparse irq's that
      I raised a while back.  There was discussion about adding
      refcounting to sparse irqs (to fix other potential race
      conditions), but that does not appear to have been addressed
      yet.  This covers the only issue of this type that I've
      encountered in this area.
      
      A NULL pointer dereference can occur in
      smp_irq_move_cleanup_interrupt() if we haven't yet setup the
      irq_cfg pointer in the irq_desc.irq_data.chip_data.
      
      In create_irq_nr() there is a window where we have set
      vector_irq in __assign_irq_vector(), but not yet called
      irq_set_chip_data() to set the irq_cfg pointer.
      
      Should an IRQ_MOVE_CLEANUP_VECTOR hit the cpu in question during
      this time, smp_irq_move_cleanup_interrupt() will attempt to
      process the aforementioned irq, but panic when accessing
      irq_cfg.
      
      Only continue processing the irq if irq_cfg is non-NULL.
      Signed-off-by: NDimitri Sivanich <sivanich@sgi.com>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: Joerg Roedel <joerg.roedel@amd.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Alexander Gordeev <agordeev@redhat.com>
      Link: http://lkml.kernel.org/r/20121016125021.GA22935@sgi.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      94777fc5
    • M
      x86/efi: Fix oops caused by incorrect set_memory_uc() usage · 3e8fa263
      Matt Fleming 提交于
      Calling __pa() with an ioremap'd address is invalid. If we
      encounter an efi_memory_desc_t without EFI_MEMORY_WB set in
      ->attribute we currently call set_memory_uc(), which in turn
      calls __pa() on a potentially ioremap'd address.
      
      On CONFIG_X86_32 this results in the following oops:
      
        BUG: unable to handle kernel paging request at f7f22280
        IP: [<c10257b9>] reserve_ram_pages_type+0x89/0x210
        *pdpt = 0000000001978001 *pde = 0000000001ffb067 *pte = 0000000000000000
        Oops: 0000 [#1] PREEMPT SMP
        Modules linked in:
      
        Pid: 0, comm: swapper Not tainted 3.0.0-acpi-efi-0805 #3
         EIP: 0060:[<c10257b9>] EFLAGS: 00010202 CPU: 0
         EIP is at reserve_ram_pages_type+0x89/0x210
         EAX: 0070e280 EBX: 38714000 ECX: f7814000 EDX: 00000000
         ESI: 00000000 EDI: 38715000 EBP: c189fef0 ESP: c189fea8
         DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
        Process swapper (pid: 0, ti=c189e000 task=c18bbe60 task.ti=c189e000)
        Stack:
         80000200 ff108000 00000000 c189ff00 00038714 00000000 00000000 c189fed0
         c104f8ca 00038714 00000000 00038715 00000000 00000000 00038715 00000000
         00000010 38715000 c189ff48 c1025aff 38715000 00000000 00000010 00000000
        Call Trace:
         [<c104f8ca>] ? page_is_ram+0x1a/0x40
         [<c1025aff>] reserve_memtype+0xdf/0x2f0
         [<c1024dc9>] set_memory_uc+0x49/0xa0
         [<c19334d0>] efi_enter_virtual_mode+0x1c2/0x3aa
         [<c19216d4>] start_kernel+0x291/0x2f2
         [<c19211c7>] ? loglevel+0x1b/0x1b
         [<c19210bf>] i386_start_kernel+0xbf/0xc8
      
      The only time we can call set_memory_uc() for a memory region is
      when it is part of the direct kernel mapping. For the case where
      we ioremap a memory region we must leave it alone.
      
      This patch reimplements the fix from e8c71062 ("x86, efi:
      Calling __pa() with an ioremap()ed address is invalid") which
      was reverted in e1ad783b because it caused a regression on
      some MacBooks (they hung at boot). The regression was caused
      because the commit only marked EFI_RUNTIME_SERVICES_DATA as
      E820_RESERVED_EFI, when it should have marked all regions that
      have the EFI_MEMORY_RUNTIME attribute.
      
      Despite first impressions, it's not possible to use
      ioremap_cache() to map all cached memory regions on
      CONFIG_X86_64 because of the way that the memory map might be
      configured as detailed in the following bug report,
      
      	https://bugzilla.redhat.com/show_bug.cgi?id=748516
      
      e.g. some of the EFI memory regions *need* to be mapped as part
      of the direct kernel mapping.
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Huang Ying <huang.ying.caritas@gmail.com>
      Cc: Keith Packard <keithp@keithp.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: http://lkml.kernel.org/r/1350649546-23541-1-git-send-email-matt@console-pimps.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      3e8fa263
    • J
      x86-64: Fix page table accounting · 876ee61a
      Jan Beulich 提交于
      Commit 20167d34 ("x86-64: Fix
      accounting in kernel_physical_mapping_init()") went a little too
      far by entirely removing the counting of pre-populated page
      tables: this should be done at boot time (to cover the page
      tables set up in early boot code), but shouldn't be done during
      memory hot add.
      
      Hence, re-add the removed increments of "pages", but make them
      and the one in phys_pte_init() conditional upon !after_bootmem.
      Reported-Acked-and-Tested-by: NHugh Dickins <hughd@google.com>
      Signed-off-by: NJan Beulich <jbeulich@suse.com>
      Cc: <stable@kernel.org>
      Link: http://lkml.kernel.org/r/506DAFBA020000780009FA8C@nat28.tlf.novell.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      876ee61a
    • D
      Revert "x86/mm: Fix the size calculation of mapping tables" · 7b16bbf9
      Dave Young 提交于
      Commit:
      
         722bc6b1 x86/mm: Fix the size calculation of mapping tables
      
      Tried to address the issue that the first 2/4M should use 4k pages
      if PSE enabled, but extra counts should only be valid for x86_32.
      
      This commit caused a kdump regression: the kdump kernel hangs.
      
      Work is in progress to fundamentally fix the various page table
      initialization issues that we have, via the design suggested
      by H. Peter Anvin, but it's not ready yet to be merged.
      
      So, to get a working kdump revert to the last known working version,
      which is the revert of this commit and of a followup fix (which was
      incomplete):
      
         bd2753b2 x86/mm: Only add extra pages count for the first memory range during pre-allocation
      
      Tested kdump on physical and virtual machines.
      Signed-off-by: NDave Young <dyoung@redhat.com>
      Acked-by: NYinghai Lu <yinghai@kernel.org>
      Acked-by: NCong Wang <xiyou.wangcong@gmail.com>
      Acked-by: NFlavio Leitner <fbl@redhat.com>
      Tested-by: NFlavio Leitner <fbl@redhat.com>
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Cc: Cong Wang <xiyou.wangcong@gmail.com>
      Cc: Flavio Leitner <fbl@redhat.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: ianfang.cn@gmail.com
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: <stable@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      7b16bbf9
    • L
      Merge tag 'stable/for-linus-3.7-rc2-tag' of... · 0e9e3e30
      Linus Torvalds 提交于
      Merge tag 'stable/for-linus-3.7-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
      
      Pull xen bug-fixes from Konrad Rzeszutek Wilk:
       - Fix mysterious SIGSEGV or SIGKILL in applications due to corrupting
         of the %eip when returning from a signal handler.
       - Fix various ARM compile issues after the merge fallout.
       - Continue on making more of the Xen generic code usable by ARM
         platform.
       - Fix SR-IOV passthrough to mirror multifunction PCI devices.
       - Fix various compile warnings.
       - Remove hypercalls that don't exist anymore.
      
      * tag 'stable/for-linus-3.7-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen: dbgp: Fix warning when CONFIG_PCI is not enabled.
        xen: arm: comment on why 64-bit xen_pfn_t is safe even on 32 bit
        xen: balloon: use correct type for frame_list
        xen/x86: don't corrupt %eip when returning from a signal handler
        xen: arm: make p2m operations NOPs
        xen: balloon: don't include e820.h
        xen: grant: use xen_pfn_t type for frame_list.
        xen: events: pirq_check_eoi_map is X86 specific
        xen: XENMEM_translate_gpfn_list was remove ages ago and is unused.
        xen: sysfs: fix build warning.
        xen: sysfs: include err.h for PTR_ERR etc
        xen: xenbus: quirk uses x86 specific cpuid
        xen PV passthru: assign SR-IOV virtual functions to separate virtual slots
        xen/xenbus: Fix compile warning.
        xen/x86: remove duplicated include from enlighten.c
      0e9e3e30
    • A
      alpha: separate thread-synchronous flags · 3185bd26
      Al Viro 提交于
      ... and fix the race in updating unaligned control ones
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3185bd26
    • L
      Merge tag 'kvm-3.7-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 3d0ceac1
      Linus Torvalds 提交于
      Pull kvm fixes from Avi Kivity:
       "KVM updates for 3.7-rc2"
      
      * tag 'kvm-3.7-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM guest: exit idleness when handling KVM_PV_REASON_PAGE_NOT_PRESENT
        KVM: apic: fix LDR calculation in x2apic mode
        KVM: MMU: fix release noslot pfn
      3d0ceac1
    • L
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e17b1315
      Linus Torvalds 提交于
      Pull perf fixes from Ingo Molnar:
       "Most of these are uprobes race fixes from Oleg, and their preparatory
        cleanups.  (It's larger than what I'd normally send for an -rc kernel,
        but they looked significant enough to not delay them.)
      
        There's also an oprofile fix and an uncore PMU fix."
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits)
        perf/x86: Disable uncore on virtualized CPUs
        oprofile, x86: Fix wrapping bug in op_x86_get_ctrl()
        ring-buffer: Check for uninitialized cpu buffer before resizing
        uprobes: Fix the racy uprobe->flags manipulation
        uprobes: Fix prepare_uprobe() race with itself
        uprobes: Introduce prepare_uprobe()
        uprobes: Fix handle_swbp() vs unregister() + register() race
        uprobes: Do not delete uprobe if uprobe_unregister() fails
        uprobes: Don't return success if alloc_uprobe() fails
        uprobes/x86: Only rep+nop can be emulated correctly
        uprobes: Simplify is_swbp_at_addr(), remove stale comments
        uprobes: Kill set_orig_insn()->is_swbp_at_addr()
        uprobes: Introduce copy_opcode(), kill read_opcode()
        uprobes: Kill set_swbp()->is_swbp_at_addr()
        uprobes: Restrict valid_vma(false) to skip VM_SHARED vmas
        uprobes: Change valid_vma() to demand VM_MAYEXEC rather than VM_EXEC
        uprobes: Change write_opcode() to use FOLL_FORCE
        uprobes: Move clear_thread_flag(TIF_UPROBE) to uprobe_notify_resume()
        uprobes: Kill UTASK_BP_HIT state
        uprobes: Fix UPROBE_SKIP_SSTEP checks in handle_swbp()
        ...
      e17b1315
    • L
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 684baeb1
      Linus Torvalds 提交于
      Pull core kernel fixes from Ingo Molnar:
       "Two small fixes"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        Documentation: Reflect the new location of the NMI watchdog info
        nohz: Fix idle ticks in cpu summary line of /proc/stat
      684baeb1
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 4e3ab74c
      Linus Torvalds 提交于
      Pull s390 fixes from Martin Schwidefsky:
       "Among the usual minor bug fixes the more interesting patches are the
        perf counters for the latest machine, the missing select to enable
        transparent huge pages and a build fix for the UAPI rework."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390,uapi: do not use uapi/asm-generic/kvm_para.h
        s390/cache: fix data/instruction cache output
        s390: fix linker script for 31 bit builds
        s390/thp: select HAVE_ARCH_TRANSPARENT_HUGEPAGE
        s390/kdump: Use 64 bit mode for 0x10000 entry point
        perf_cpum_cf: Add support for counters available with IBM zEC12
        s390/css: stop stsch loop after cc 3
        s390/cio: use generic bitmap functions
        s390/chpid: make headers usable (again)
      4e3ab74c
    • L
      Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile · 4a09cbce
      Linus Torvalds 提交于
      Pull tile fixes from Chris Metcalf:
       "This fixes one issue with compiler flags that can cause modules not to
        load, and cleans up some warnings with ELF_R_xxx defines."
      
      * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
        arch/tile: avoid build warnings from duplicate ELF_R_xxx #defines
        arch/tile: avoid generating .eh_frame information in modules
      4a09cbce
    • L
      Merge tag 'please-pull-uapi-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux · 62472efe
      Linus Torvalds 提交于
      Pull ia64 fix from Tony Luck:
       "Fix from dhowells for UAPI fallout"
      
      * tag 'please-pull-uapi-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
        UAPI: Make arch/ia64/include/asm/kvm_para.h generic
      62472efe
  3. 23 10月, 2012 17 次提交
  4. 22 10月, 2012 10 次提交