1. 30 May, 2013 1 commit
  2. 28 May, 2013 1 commit
    • Zhang Yanfei's avatar
      x86-64, init: Fix a possible wraparound bug in switchover in head_64.S · e9d0626e
      Zhang Yanfei authored
      In head_64.S, a switchover has been used to handle kernel crossing
      1G, 512G boundaries.
      
      And commit 8170e6be
          x86, 64bit: Use a #PF handler to materialize early mappings on demand
      said:
          During the switchover in head_64.S, before #PF handler is available,
          we use three pages to handle kernel crossing 1G, 512G boundaries with
          sharing page by playing games with page aliasing: the same page is
          mapped twice in the higher-level tables with appropriate wraparound.
      
      But from the switchover code, when we set up the PUD table:
      114         addq    $4096, %rdx
      115         movq    %rdi, %rax
      116         shrq    $PUD_SHIFT, %rax
      117         andl    $(PTRS_PER_PUD-1), %eax
      118         movq    %rdx, (4096+0)(%rbx,%rax,8)
      119         movq    %rdx, (4096+8)(%rbx,%rax,8)
      
      It seems line 119 has a potential bug there. For example,
      if the kernel is loaded at physical address 511G+1008M, that is
          000000000 111111111 111111000 000000000000000000000
      and the kernel _end is 512G+2M, that is
          000000001 000000000 000000001 000000000000000000000
      So in this example, when using the 2nd page to setup PUD (line 114~119),
      rax is 511.
      In line 118, we put rdx which is the address of the PMD page (the 3rd page)
      into entry 511 of the PUD table. But in line 119, the entry we calculate from
      (4096+8)(%rbx,%rax,8) has exceeded the PUD page. IMO, the entry in line
      119 should be wraparound into entry 0 of the PUD table.
      
      The patch fixes the bug.
      Signed-off-by: default avatarZhang Yanfei <zhangyanfei@cn.fujitsu.com>
      Link: http://lkml.kernel.org/r/5191DE5A.3020302@cn.fujitsu.comSigned-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Cc: <stable@vger.kernel.org> v3.9
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      e9d0626e
  3. 22 May, 2013 1 commit
    • H. Peter Anvin's avatar
      Merge tag 'efi-urgent' into x86/urgent · 3979fdce
      H. Peter Anvin authored
       * Avoid confusing the user by returning -EIO instead of -ENOENT in
         efivarfs if an EFI variable gets deleted from under us and return EOF
         when reading from a zero-length file - Lingzhu Xiang
      
       * Fix an oops in efivar_update_sysfs_entries() caused by reusing (and
         therefore corrupting) a kzalloc() allocation - Seiji Aguchi
      
       * Initialise the DataSize argument to GetVariable() otherwise it will
         not be updated with the actual size of the variable on return.
         Discovered on a Acer Aspire V3 BIOS - Lee, Chun-Yi
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      3979fdce
  4. 17 May, 2013 9 commits
    • Yinghai Lu's avatar
      x86, range: fix missing merge during add range · fbe06b7b
      Yinghai Lu authored
      Christian found v3.9 does not work with E350 with EFI is enabled.
      
      [    1.658832] Trying to unpack rootfs image as initramfs...
      [    1.679935] BUG: unable to handle kernel paging request at ffff88006e3fd000
      [    1.686940] IP: [<ffffffff813661df>] memset+0x1f/0xb0
      [    1.692010] PGD 1f77067 PUD 1f7a067 PMD 61420067 PTE 0
      
      but early memtest report all memory could be accessed without problem.
      
      early page table is set in following sequence:
      [    0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff]
      [    0.000000] init_memory_mapping: [mem 0x6e600000-0x6e7fffff]
      [    0.000000] init_memory_mapping: [mem 0x6c000000-0x6e5fffff]
      [    0.000000] init_memory_mapping: [mem 0x00100000-0x6bffffff]
      [    0.000000] init_memory_mapping: [mem 0x6e800000-0x6ea07fff]
      but later efi_enter_virtual_mode try set mapping again wrongly.
      [    0.010644] pid_max: default: 32768 minimum: 301
      [    0.015302] init_memory_mapping: [mem 0x640c5000-0x6e3fcfff]
      that means it fails with pfn_range_is_mapped.
      
      It turns out that we have a bug in add_range_with_merge and it does not
      merge range properly when new add one fill the hole between two exsiting
      ranges. In the case when [mem 0x00100000-0x6bffffff] is the hole between
      [mem 0x00000000-0x000fffff] and [mem 0x6c000000-0x6e7fffff].
      
      Fix the add_range_with_merge by calling itself recursively.
      Reported-by: default avatar"Christian König" <christian.koenig@amd.com>
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/CAE9FiQVofGoSk7q5-0irjkBxemqK729cND4hov-1QCBJDhxpgQ@mail.gmail.com
      Cc: <stable@vger.kernel.org> v3.9
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      fbe06b7b
    • Linus Torvalds's avatar
      Merge tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 8f710dd3
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "A fairly calm update at this time, as seen in the short log, only one
        fix per person: including,
      
         - a few ASoC fixes (da7213 dmic, ux500 AD slot, wm0010 error path)
         - a copule of HD-audio fixes
         - a few other misc fixes (MIPS allmodconfig, proc output in usb, old
           PowerBook support)"
      
      * tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: usb-audio: proc: use found syncmaxsize to determine feedback format
        ALSA: hda - Add headset mic support for another Dell machine
        ALSA: snd-aoa: Add a layout entry for PowerBook6,5
        ALSA: hda - Check the activity of the NID to be powered down
        sound: Fix make allmodconfig on MIPS correctly
        ASoC: da7213: Fix setting dmic_samplephase and dmic_clk_rate
        ASoC: ux500: Swap even/odd AD slot definitions
        ASoC: wm0010: fix error return code in wm0010_boot()
      8f710dd3
    • Torstein Hegge's avatar
      ALSA: usb-audio: proc: use found syncmaxsize to determine feedback format · e6135fe9
      Torstein Hegge authored
      freqshift is only set for the data endpoint and syncmaxsize is only set
      for the sync endpoint. This results in a syncmaxsize of zero used in the
      proc output feedback format calculation, which gives a feedback format
      incorrectly shown as 8.16 for UAC2 devices.
      
      As neither the data nor the sync endpoint gives all the relevant
      content, output the two combined.
      
      Also remove the sync_endpoint "packet size" which is always zero
      and the sync_endpoint "momentary freq" which is constant.
      
      Tested with UAC2 async and UAC1 adaptive, not tested with UAC1 async.
      Reported-by: default avatarB. Zhang <bb.zhang@free.fr>
      Signed-off-by: default avatarTorstein Hegge <hegge@resisty.net>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      e6135fe9
    • Linus Torvalds's avatar
      Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux · ec50f2a9
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Fix for radeon nomodeset regression, old radeon interface cliprects
        fix, 2 qxl crasher fixes, and a couple of minor cleanups.
      
        I may have a new AMD hw support branch next week, its one of those
        doesn't affect anything existing just adds new support, I'll see how
        it shapes up and I might ask you to take it, just thought I'd warn in
        advance."
      
      * 'drm-next' of git://people.freedesktop.org/~airlied/linux:
        drm/radeon: restore nomodeset operation (v2)
        qxl: fix bug with object eviction and update area
        drm/qxl: drop active_user_framebuffer as its unneeded
        qxl: drop unused variable.
        drm/qxl: fix ioport interactions for kernel submitted commands.
        drm: remove unused wrapper macros
        drm/radeon: check incoming cliprects pointer
      ec50f2a9
    • Dave Airlie's avatar
      drm/radeon: restore nomodeset operation (v2) · e9ced8e0
      Dave Airlie authored
      When UMS was deprecated it removed support for nomodeset commandline
      we really want this in distro land so we can debug stuff, everyone
      should fallback to vesa correctly.
      
      v2: oops -1 isn't used anymore, restore original behaviour
      -1 is default, so we can boot with nomodeset on the command line,
      then use radeon.modeset=1 to override it for debugging later.
      
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      e9ced8e0
    • Dave Airlie's avatar
      qxl: fix bug with object eviction and update area · b90ed1e9
      Dave Airlie authored
      if the surface is evicted, this validation will happen
      to the wrong place, I noticed this with other work I was
      doing, haven't seen it go wrong in practice.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      b90ed1e9
    • Dave Airlie's avatar
      drm/qxl: drop active_user_framebuffer as its unneeded · b2b4465d
      Dave Airlie authored
      This was a bogus way to figure out what the active framebuffer was,
      just check if the underlying bo is the primary bo.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      b2b4465d
    • Dave Airlie's avatar
      qxl: drop unused variable. · d7292a07
      Dave Airlie authored
      this boolean isn't used anymore so drop it.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      d7292a07
    • Dave Airlie's avatar
      drm/qxl: fix ioport interactions for kernel submitted commands. · a6ac1bc3
      Dave Airlie authored
      So qxl has ioports, but it really really really doesn't want you
      to write to them twice, but if you write and get a signal before
      the irq arrives to let you know its completed, you have to think
      ahead and avoid writing another time.
      
      However this works fine for update area where really multiple
      writes aren't the end of the world, however with create primary
      surface, you can't ever do multiple writes. So this stop internal
      kernel writes from doing interruptible waits, because otherwise
      we have no idea if this write is a new one or a continuation of
      a previous one.
      
      virtual hw sucks more than real hw.
      
      This fixes lockups and VM crashes when resizing and starting/stopping
      X.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      a6ac1bc3
  5. 16 May, 2013 17 commits
  6. 15 May, 2013 11 commits
    • Tejun Heo's avatar
      workqueue: don't perform NUMA-aware allocations on offline nodes in wq_numa_init() · 1be0c25d
      Tejun Heo authored
      wq_numa_init() builds per-node cpumasks which are later used to make
      unbound workqueues NUMA-aware.  The cpumasks are allocated using
      alloc_cpumask_var_node() for all possible nodes.  Unfortunately, on
      machines with off-line nodes, this leads to NUMA-aware allocations on
      existing bug offline nodes, which in turn triggers BUG in the memory
      allocation code.
      
      Fix it by using NUMA_NO_NODE for cpumask allocations for offline
      nodes.
      
        kernel BUG at include/linux/gfp.h:323!
        invalid opcode: 0000 [#1] SMP
        Modules linked in:
        CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.9.0+ #1
        Hardware name: ProLiant BL465c G7, BIOS A19 12/10/2011
        task: ffff880234608000 ti: ffff880234602000 task.ti: ffff880234602000
        RIP: 0010:[<ffffffff8117495d>]  [<ffffffff8117495d>] new_slab+0x2ad/0x340
        RSP: 0000:ffff880234603bf8  EFLAGS: 00010246
        RAX: 0000000000000000 RBX: ffff880237404b40 RCX: 00000000000000d0
        RDX: 0000000000000001 RSI: 0000000000000003 RDI: 00000000002052d0
        RBP: ffff880234603c28 R08: 0000000000000000 R09: 0000000000000001
        R10: 0000000000000001 R11: ffffffff812e3aa8 R12: 0000000000000001
        R13: ffff8802378161c0 R14: 0000000000030027 R15: 00000000000040d0
        FS:  0000000000000000(0000) GS:ffff880237800000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
        CR2: ffff88043fdff000 CR3: 00000000018d5000 CR4: 00000000000007f0
        DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
        DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
        Stack:
         ffff880234603c28 0000000000000001 00000000000000d0 ffff8802378161c0
         ffff880237404b40 ffff880237404b40 ffff880234603d28 ffffffff815edba1
         ffff880237816140 0000000000000000 ffff88023740e1c0
        Call Trace:
         [<ffffffff815edba1>] __slab_alloc+0x330/0x4f2
         [<ffffffff81174b25>] kmem_cache_alloc_node_trace+0xa5/0x200
         [<ffffffff812e3aa8>] alloc_cpumask_var_node+0x28/0x90
         [<ffffffff81a0bdb3>] wq_numa_init+0x10d/0x1be
         [<ffffffff81a0bec8>] init_workqueues+0x64/0x341
         [<ffffffff810002ea>] do_one_initcall+0xea/0x1a0
         [<ffffffff819f1f31>] kernel_init_freeable+0xb7/0x1ec
         [<ffffffff815d50de>] kernel_init+0xe/0xf0
         [<ffffffff815ff89c>] ret_from_fork+0x7c/0xb0
        Code: 45  84 ac 00 00 00 f0 41 80 4d 00 40 e9 f6 fe ff ff 66 0f 1f 84 00 00 00 00 00 e8 eb 4b ff ff 49 89 c5 e9 05 fe ff ff <0f> 0b 4c 8b 73 38 44 89 ff 81 cf 00 00 20 00 4c 89 f6 48 c1 ee
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reported-and-Tested-by: default avatarLingzhu Xiang <lxiang@redhat.com>
      1be0c25d
    • Linus Torvalds's avatar
      Merge tag 'trace-fixes-v3.10-rc1' of... · c240a539
      Linus Torvalds authored
      Merge tag 'trace-fixes-v3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
      
      Pull tracing fixes from Steven Rostedt:
       "This includes a fix to a memory leak when adding filters to traces.
      
        Also, Masami Hiramatsu fixed up some minor bugs that were discovered
        by sparse."
      
      * tag 'trace-fixes-v3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing/kprobes: Make print_*probe_event static
        tracing/kprobes: Fix a sparse warning for incorrect type in assignment
        tracing/kprobes: Use rcu_dereference_raw for tp->files
        tracing: Fix leaks of filter preds
      c240a539
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ae3b29e6
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
      
       - Fix for a CPU hot-add deadlock in microcode update code
      
       - Fix for idle consolidation fallout
      
       - Documentation update for initial kernel direct mapping
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mm: Add missing comments for initial kernel direct mapping
        x86/microcode: Add local mutex to fix physical CPU hot-add deadlock
        x86: Fix idle consolidation fallout
      ae3b29e6
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 652df602
      Linus Torvalds authored
      Pull perf fixes from Thomas Gleixner:
      
       - Fix for a task exit cleanup race caused by a missing a preempt
         disable
      
       - Cleanup of the event notification functions with a massive reduction
         of duplicated code
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf: Factor out auxiliary events notification
        perf: Fix EXIT event notification
      652df602
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · cc51bf6e
      Linus Torvalds authored
      Pull timer fixes from Thomas Gleixner:
      
       - Cure for not using zalloc in the first place, which leads to random
         crashes with CPUMASK_OFF_STACK.
      
       - Revert a user space visible change which broke udev
      
       - Add a missing cpu_online early return introduced by the new full
         dyntick conversions
      
       - Plug a long standing race in the timer wheel cpu hotplug code.
         Sigh...
      
       - Cleanup NOHZ per cpu data on cpu down to prevent stale data on cpu
         up.
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        time: Revert ALWAYS_USE_PERSISTENT_CLOCK compile time optimizaitons
        timer: Don't reinitialize the cpu base lock during CPU_UP_PREPARE
        tick: Don't invoke tick_nohz_stop_sched_tick() if the cpu is offline
        tick: Cleanup NOHZ per cpu data on cpu down
        tick: Use zalloc_cpumask_var for allocating offstack cpumasks
      cc51bf6e
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 37cae5e2
      Linus Torvalds authored
      Pull core fixes from Thomas Gleixner:
      
       - Two fixlets for the fallout of the generic idle task conversion
      
       - Documentation update
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        rcu/idle: Wrap cpu-idle poll mode within rcu_idle_enter/exit
        idle: Fix hlt/nohlt command-line handling in new generic idle
        kthread: Document ways of reducing OS jitter due to per-CPU kthreads
      37cae5e2
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm · d21572c5
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "A small number of fixes for stuff from the last merge window, and in
        one case (IRQ time accounting) the previous merge window."
      
      * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: 7720/1: ARM v6/v7 cmpxchg64 shouldn't clear upper 32 bits of the old/new value
        ARM: 7715/1: MCPM: adapt to GIC changes after upstream merge
        ARM: 7714/1: mmc: mmci: Ensure return value of regulator_enable() is checked
        ARM: 7712/1: Remove trailing whitespace in arch/arm/Makefile
        ARM: 7711/1: dove: fix Dove cpu type from V7 to PJ4
        ARM: finally enable IRQ time accounting config
      d21572c5
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client · 109c3c02
      Linus Torvalds authored
      Pull Ceph fixes from Sage Weil:
       "Yes, this is a much larger pull than I would like after -rc1.  There
        are a few things included:
      
         - a few fixes for leaks and incorrect assertions
         - a few patches fixing behavior when mapped images are resized
         - handling for cloned/layered images that are flattened out from
           underneath the client
      
        The last bit was non-trivial, and there is some code movement and
        associated cleanup mixed in.  This was ready and was meant to go in
        last week but I missed the boat on Friday.  My only excuse is that I
        was waiting for an all clear from the testing and there were many
        other shiny things to distract me.
      
        Strictly speaking, handling the flatten case isn't a regression and
        could wait, so if you like we can try to pull the series apart, but
        Alex and I would much prefer to have it all in as it is a case real
        users will hit with 3.10."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (33 commits)
        rbd: re-submit flattened write request (part 2)
        rbd: re-submit write request for flattened clone
        rbd: re-submit read request for flattened clone
        rbd: detect when clone image is flattened
        rbd: reference count parent requests
        rbd: define parent image request routines
        rbd: define rbd_dev_unparent()
        rbd: don't release write request until necessary
        rbd: get parent info on refresh
        rbd: ignore zero-overlap parent
        rbd: support reading parent page data for writes
        rbd: fix parent request size assumption
        libceph: init sent and completed when starting
        rbd: kill rbd_img_request_get()
        rbd: only set up watch for mapped images
        rbd: set mapping read-only flag in rbd_add()
        rbd: support reading parent page data
        rbd: fix an incorrect assertion condition
        rbd: define rbd_dev_v2_header_info()
        rbd: get rid of trivial v1 header wrappers
        ...
      109c3c02
    • Srivatsa S. Bhat's avatar
      cpufreq: Preserve sysfs files across suspend/resume · a66b2e50
      Srivatsa S. Bhat authored
      The file permissions of cpufreq per-cpu sysfs files are not preserved
      across suspend/resume because we internally go through the CPU
      Hotplug path which reinitializes the file permissions on CPU online.
      
      But the user is not supposed to know that we are using CPU hotplug
      internally within suspend/resume (IOW, the kernel should not silently
      wreck the user-set file permissions across a suspend cycle).
      Therefore, we need to preserve the file permissions as they are
      across suspend/resume.
      
      The simplest way to achieve that is to just not touch the sysfs files
      at all - ie., just ignore the CPU hotplug notifications in the
      suspend/resume path (_FROZEN) in the cpufreq hotplug callback.
      Reported-by: default avatarRobert Jarzmik <robert.jarzmik@intel.com>
      Reported-by: default avatarDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a66b2e50
    • Catalin Marinas's avatar
      ACPI / scan: Fix memory leak on acpi_scan_init_hotplug() error path · 7a26b530
      Catalin Marinas authored
      Following commit 6b772e8f (ACPI: Update PNPID match handling for
      notify), the acpi_scan_init_hotplug() calls acpi_set_pnp_ids() which
      allocates acpi_hardware_id and copies a few strings (kstrdup). If the
      devices does not have hardware_id set, the function exits without
      freeing the previously allocated ids (and kmemleak complains). This
      patch calls simply changes 'return' on error to a 'goto out' which
      calls acpi_free_pnp_ids().
      Reported-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Reviewed-by: default avatarToshi Kani <toshi.kani@hp.com>
      Tested-by: default avatarToshi Kani <toshi.kani@hp.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      7a26b530
    • Jon Mason's avatar
      NTB: Multiple NTB client fix · 8b19d450
      Jon Mason authored
      Fix issue with adding multiple ntb client devices to the ntb virtual
      bus.  Previously, multiple devices would be added with the same name,
      resulting in crashes.  To get around this issue, add a unique number to
      the device when it is added.
      Signed-off-by: default avatarJon Mason <jon.mason@intel.com>
      8b19d450