Skip to content
  1. May 11, 2012
  2. May 10, 2012
    • Jan Kiszka's avatar
      compat: Fix RT signal mask corruption via sigprocmask · b7dafa0e
      Jan Kiszka authored
      
      
      compat_sys_sigprocmask reads a smaller signal mask from userspace than
      sigprogmask accepts for setting.  So the high word of blocked.sig[0]
      will be cleared, releasing any potentially blocked RT signal.
      
      This was discovered via userspace code that relies on get/setcontext.
      glibc's i386 versions of those functions use sigprogmask instead of
      rt_sigprogmask to save/restore signal mask and caused RT signal
      unblocking this way.
      
      As suggested by Linus, this replaces the sys_sigprocmask based compat
      version with one that open-codes the required logic, including the merge
      of the existing blocked set with the new one provided on SIG_SETMASK.
      
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b7dafa0e
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 7ee94d97
      Linus Torvalds authored
      Pull ARM: SoC fixes from Olof Johansson:
       "Things have slowed down a lot for us, but we have five more fixes for
        omap and kirkwood below.  Three are for boards setup issues, two are
        SoC-level fixes."
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: OMAP: igep0020: fix smsc911x dummy regulator id
        ARM: orion5x: Fix GPIO enable bits for MPP9
        ARM: kirkwood: add missing kexec.h include
        ARM: OMAP: Revert "ARM: OMAP: ctrl: Fix CONTROL_DSIPHY register fields"
        ARM: OMAP1: Amstrad Delta: Fix wrong IRQ base in FIQ handler
      7ee94d97
    • Linus Torvalds's avatar
      Merge tag 'regmap-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · 22b6dd78
      Linus Torvalds authored
      Pull last minute regman bug fix from Mark Brown:
       "This is a last minute bug fix that was only just noticed since the
        code path that's being exercised here is one that is fairly rarely
        used.  The changelog for the change itself is extremely clear and the
        code itself is obvious to inspection so should be pretty safe."
      
      * tag 'regmap-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: fix possible memory corruption in regmap_bulk_read()
      22b6dd78
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/virt/kvm/kvm · 63f4711a
      Linus Torvalds authored
      Pull KVM fixes from Avi Kivity:
       "Two asynchronous page fault fixes (one guest, one host), a powerpc
        page refcount fix, and an ia64 build fix."
      
      * git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: ia64: fix build due to typo
        KVM: PPC: Book3S HV: Fix refcounting of hugepages
        KVM: Do not take reference to mm during async #PF
        KVM: ensure async PF event wakes up vcpu from halt
      63f4711a
    • Linus Torvalds's avatar
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · 6a5beacc
      Linus Torvalds authored
      Pull powerpc fixes from Benjamin Herrenschmidt:
       "Here are a couple of last minute fixes for 3.4 for regressions
        introduced by my rewrite of the lazy irq masking code."
      
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        powerpc/irq: Make alignment & program interrupt behave the same
        powerpc/irq: Fix bug with new lazy IRQ handling code
      6a5beacc
    • Olof Johansson's avatar
      Merge tag 'omap-fixes-for-v3.4-rc6-take-2' of... · e396dbd4
      Olof Johansson authored
      Merge tag 'omap-fixes-for-v3.4-rc6-take-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      Fix two board spefific regressions and one regression caused by bad documentation
      
      By Archit Taneja (1) and others
      via Tony Lindgren
      * tag 'omap-fixes-for-v3.4-rc6-take-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: OMAP: igep0020: fix smsc911x dummy regulator id
        ARM: OMAP: Revert "ARM: OMAP: ctrl: Fix CONTROL_DSIPHY register fields"
        ARM: OMAP1: Amstrad Delta: Fix wrong IRQ base in FIQ handler
      e396dbd4
  3. May 09, 2012
    • Enrico Butera's avatar
      ARM: OMAP: igep0020: fix smsc911x dummy regulator id · 1a21932e
      Enrico Butera authored
      id 0 is already used and causes errors at boot:
      
      WARNING: at fs/sysfs/dir.c:508 sysfs_add_one+0x9c/0xac()
      sysfs: cannot create duplicate filename '/devices/platform/reg-fixed-voltage.0'
      
      Fix it by using the next available one (id=1).
      
      This was caused by 5b3689f4
      
       (ARM: OMAP2+: smsc911x: Add fixed
      board regulators) that did not account for some regulators
      already being used.
      
      Signed-off-by: default avatarEnrico Butera <ebutera@users.berlios.de>
      [tony@atomide.com: updated comments for regression causing commit]
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      1a21932e
    • Laxman Dewangan's avatar
      regmap: fix possible memory corruption in regmap_bulk_read() · 6560ffd1
      Laxman Dewangan authored
      
      
      The function regmap_bulk_read() calls the regmap_read() for
      each register if set of register has volatile and cache is
      enabled. In this case, last few register read makes the memory
      corruption if the register size is not the size of unsigned int.
      The regam_read() takes argument as unsigned int for returning
      value and it update the value as
      	*val = map->format.parse_val(map->work_buf);
      This causes complete 4 bytes (size of unsigned int) to get written.
      Now if client pass the memory pointer for value which is equal to the
      required size of register count in regmap_bulk_read() then last few
      register read actually update the memory beyond passed pointer size.
      
      Avoid this by using local variable for read and then do memcpy()
      for actual byte copy to passed pointer based on register size.
      
      I allocated one pointer ptr and take first 16 bytes dump of that
      pointer then call regmap_bulk_read() with pointer which is just
      on top of this allocated pointer and register count of 128. Here
      register size is 1 byte.
      The memory trace of last 5 register read are as follows:
      
      [    5.438589] regmap_bulk_read after regamp_read() for register 122
      [    5.447421] 0xef993c20 0xef993c00 0x00000000 0x00000001
      [    5.467535] regmap_bulk_read after regamp_read() for register 123
      [    5.476374] 0xef993c20 0xef993c00 0x00000000 0x00000001
      [    5.496425] regmap_bulk_read after regamp_read() for register 124
      [    5.505260] 0xef993c20 0xef993c00 0x00000000 0x00000001
      [    5.525372] regmap_bulk_read after regamp_read() for register 125
      [    5.534205] 0xef993c00 0xef993c00 0x00000000 0x00000001
      [    5.554258] regmap_bulk_read after regamp_read() for register 126
      [    5.563100] 0xef990000 0xef993c00 0x00000000 0x00000001
      [    5.554258] regmap_bulk_read after regamp_read() for register 127
      [    5.587108] 0xef000000 0xef993c00 0x00000000 0x00000001
      
      Here it is observed that the memory content at first word started changing
      on last 3 regmap_read() and so corruption happened.
      
      Signed-off-by: default avatarLaxman Dewangan <ldewangan@nvidia.com>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      6560ffd1
    • Takashi Iwai's avatar
      Merge tag 'asoc-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus · 9ea3356d
      Takashi Iwai authored
      ASoC: Build fix for SH in 3.4
      
      An API update which wasn't sufficiently thorough in updating the tree...
      9ea3356d
    • Guennadi Liakhovetski's avatar
      ASoC: sh: fix migor.c compilation · c8587193
      Guennadi Liakhovetski authored
      
      
      Fix a recent compilation breakage, caused by a change in SH clock API.
      
      Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      c8587193
    • Avi Kivity's avatar
      KVM: ia64: fix build due to typo · 331b646d
      Avi Kivity authored
      
      
      s/kcm/kvm/.
      
      Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
      331b646d
    • David Henningsson's avatar
      ALSA: HDA: Lessen CPU usage when waiting for chip to respond · 32cf4023
      David Henningsson authored
      
      
      When an IRQ for some reason gets lost, we wait up to a second using
      udelay, which is CPU intensive. This patch improves the situation by
      waiting about 30 ms in the CPU intensive mode, then stepping down to
      using msleep(2) instead. In essence, we trade some granularity in
      exchange for less CPU consumption when the waiting time is a bit longer.
      
      As a result, PulseAudio should no longer be killed by the kernel
      for taking up to much RT-prio CPU time. At least not for *this* reason.
      
      Signed-off-by: default avatarDavid Henningsson <david.henningsson@canonical.com>
      Tested-by: default avatarArun Raghavan <arun.raghavan@collabora.co.uk>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      32cf4023
    • Olof Johansson's avatar
      Merge branch 'kirkwood_fixes_for_v3.4' of... · 973076ae
      Olof Johansson authored
      Merge branch 'kirkwood_fixes_for_v3.4' of git://git.infradead.org/users/jcooper/linux-kirkwood into fixes
      
      By Ben Hutchings (1) and Ian Campbell (1)
      via Jason Cooper: "ARM: kirkwood: fixes for v3.4"
      * 'kirkwood_fixes_for_v3.4' of git://git.infradead.org/users/jcooper/linux-kirkwood:
        ARM: orion5x: Fix GPIO enable bits for MPP9
        ARM: kirkwood: add missing kexec.h include
      973076ae
    • Benjamin Herrenschmidt's avatar
      powerpc/irq: Make alignment & program interrupt behave the same · a3512b2d
      Benjamin Herrenschmidt authored
      
      
      Alignment was the last user of the ENABLE_INTS macro, which we can
      now remove. All non-syscall exceptions now disable interrupts on
      entry, they get re-enabled conditionally from C code. Don't
      unconditionally re-enable in program check either, check the
      original context.
      
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a3512b2d
    • Benjamin Herrenschmidt's avatar
      powerpc/irq: Fix bug with new lazy IRQ handling code · 56dfa7fa
      Benjamin Herrenschmidt authored
      
      
      We had a case where we could turn on hard interrupts while
      leaving the PACA_IRQ_HARD_DIS bit set in the PACA. This can
      in turn cause a BUG_ON() to hit in __check_irq_replay() due
      to interrupt state getting out of sync.
      
      The assembly code was also way too convoluted. Instead, we
      now leave it to the C code to do the right thing which ends
      up being smaller and more readable.
      
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      56dfa7fa
    • Ben Hutchings's avatar
      ARM: orion5x: Fix GPIO enable bits for MPP9 · 48d99f47
      Ben Hutchings authored
      Commit 554cdaef
      
       ('ARM: orion5x: Refactor
      mpp code to use common orion platform mpp.') seems to have accidentally
      inverted the GPIO valid bits for MPP9 (only).  For the mv2120 platform
      which uses MPP9 as a GPIO LED device, this results in the error:
      
      [   12.711476] leds-gpio: probe of leds-gpio failed with error -22
      
      Reported-by: default avatarHenry von Tresckow <hvontres@gmail.com>
      References: http://bugs.debian.org/667446
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Cc: stable@vger.kernel.org [v3.0+]
      Tested-by: default avatarHans Henry von Tresckow <hvontres@gmail.com>
      Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
      48d99f47
    • Linus Torvalds's avatar
      Merge tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · 1eef1600
      Linus Torvalds authored
      Pull regulator fixes from Mark Brown:
       "One small fix for an edge condition in the max8997 driver and a fix
        for a surprise in the devres API which caused devm_regulator_put() to
        not actually put the regulator - a nicer version of this based on an
        improvement of the devres API is queued for 3.5."
      
      * tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: Actually free the regulator in devm_regulator_put()
        regulator: Fix the logic to ensure new voltage setting in valid range
      1eef1600
    • Ian Campbell's avatar
      ARM: kirkwood: add missing kexec.h include · a7ac56de
      Ian Campbell authored
      
      
      Fixes the following build error when CONFIG_KEXEC is enabled:
        CC      arch/arm/mach-kirkwood/board-dt.o
      arch/arm/mach-kirkwood/board-dt.c: In function 'kirkwood_dt_init':
      arch/arm/mach-kirkwood/board-dt.c:52:2: error: 'kexec_reinit' undeclared (first use in this function)
      arch/arm/mach-kirkwood/board-dt.c:52:2: note: each undeclared identifier is reported only once for each function it appears in
      
      Signed-off-by: default avatarIan Campbell <ijc@hellion.org.uk>
      [v4, rebase onto recent Linus for repost]
      [v3, speak actual English in the commit message, thanks Sergei Shtylyov]
      [v2, using linux/kexec.h not asm/kexec.h]
      Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
      a7ac56de
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 789505b0
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Two fixes from Intel, one a regression, one because I merged an early
        version of a fix.
      
        Also the nouveau revert of the i2c code that was tested on the list."
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/nouveau/i2c: resume use of i2c-algo-bit, rather than custom stack
        drm/i915: Do no set Stencil Cache eviction LRA w/a on gen7+
        drm/i915: disable sdvo hotplug on i945g/gm
      789505b0
    • Linus Torvalds's avatar
      Merge tag 'stable/for-linus-3.4-rc6-tag' of... · 4ed6cede
      Linus Torvalds authored
      Merge tag 'stable/for-linus-3.4-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
      
      Pull xen fixes from Konrad Rzeszutek Wilk:
       - fix to Kconfig to make it fit within 80 line characters,
       - two bootup fixes (AMD 8-core and with PCI BIOS),
       - cleanup code in a Xen PV fb driver,
       - and a crash fix when trying to see non-existent PTE's
      
      * tag 'stable/for-linus-3.4-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen/Kconfig: fix Kconfig layout
        xen/pci: don't use PCI BIOS service for configuration space accesses
        xen/pte: Fix crashes when trying to see non-existent PGD/PMD/PUD/PTEs
        xen/apic: Return the APIC ID (and version) for CPU 0.
        drivers/video/xen-fbfront.c: add missing cleanup code
      4ed6cede
    • Linus Torvalds's avatar
      Merge branch 'for-3.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu · e9b19cd4
      Linus Torvalds authored
      Pull two percpu fixes from Tejun Heo:
       "One adds missing KERN_CONT on split printk()s and the other makes
        the percpu allocator avoid using PMD_SIZE as atom_size on x86_32.
      
        Using PMD_SIZE led to vmalloc area exhaustion on certain
        configurations (x86_32 android) and the only cost of using PAGE_SIZE
        instead is static percpu area not being aligned to large page
        mapping."
      
      * 'for-3.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
        percpu, x86: don't use PMD_SIZE as embedded atom_size on 32bit
        percpu: use KERN_CONT in pcpu_dump_alloc_info()
      e9b19cd4
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm · 301cdf5c
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "This is mainly audit fixes, found by folks who happened to enable this
        feature and then found it broke their user applications."
      
      * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: 7414/1: SMP: prevent use of the console when using idmap_pgd
        ARM: 7412/1: audit: use only AUDIT_ARCH_ARM regardless of endianness
        ARM: 7411/1: audit: fix treatment of saved ip register during syscall tracing
        ARM: 7410/1: Add extra clobber registers for assembly in kernel_execve
      301cdf5c
    • Tejun Heo's avatar
      percpu, x86: don't use PMD_SIZE as embedded atom_size on 32bit · d5e28005
      Tejun Heo authored
      
      
      With the embed percpu first chunk allocator, x86 uses either PAGE_SIZE
      or PMD_SIZE for atom_size.  PMD_SIZE is used when CPU supports PSE so
      that percpu areas are aligned to PMD mappings and possibly allow using
      PMD mappings in vmalloc areas in the future.  Using larger atom_size
      doesn't waste actual memory; however, it does require larger vmalloc
      space allocation later on for !first chunks.
      
      With reasonably sized vmalloc area, PMD_SIZE shouldn't be a problem
      but x86_32 at this point is anything but reasonable in terms of
      address space and using larger atom_size reportedly leads to frequent
      percpu allocation failures on certain setups.
      
      As there is no reason to not use PMD_SIZE on x86_64 as vmalloc space
      is aplenty and most x86_64 configurations support PSE, fix the issue
      by always using PMD_SIZE on x86_64 and PAGE_SIZE on x86_32.
      
      v2: drop cpu_has_pse test and make x86_64 always use PMD_SIZE and
          x86_32 PAGE_SIZE as suggested by hpa.
      
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reported-by: default avatarYanmin Zhang <yanmin.zhang@intel.com>
      Reported-by: default avatarShuoX Liu <shuox.liu@intel.com>
      Acked-by: default avatarH. Peter Anvin <hpa@zytor.com>
      LKML-Reference: <4F97BA98.6010001@intel.com>
      Cc: stable@vger.kernel.org
      d5e28005
  4. May 08, 2012
  5. May 07, 2012
    • Konrad Rzeszutek Wilk's avatar
      xen/pte: Fix crashes when trying to see non-existent PGD/PMD/PUD/PTEs · b7e5ffe5
      Konrad Rzeszutek Wilk authored
      
      
      If I try to do "cat /sys/kernel/debug/kernel_page_tables"
      I end up with:
      
      BUG: unable to handle kernel paging request at ffffc7fffffff000
      IP: [<ffffffff8106aa51>] ptdump_show+0x221/0x480
      PGD 0
      Oops: 0000 [#1] SMP
      CPU 0
      .. snip..
      RAX: 0000000000000000 RBX: ffffc00000000fff RCX: 0000000000000000
      RDX: 0000800000000000 RSI: 0000000000000000 RDI: ffffc7fffffff000
      
      which is due to the fact we are trying to access a PFN that is not
      accessible to us. The reason (at least in this case) was that
      PGD[256] is set to __HYPERVISOR_VIRT_START which was setup (by the
      hypervisor) to point to a read-only linear map of the MFN->PFN array.
      During our parsing we would get the MFN (a valid one), try to look
      it up in the MFN->PFN tree and find it invalid and return ~0 as PFN.
      Then pte_mfn_to_pfn would happilly feed that in, attach the flags
      and return it back to the caller. 'ptdump_show' bitshifts it and
      gets and invalid value that it tries to dereference.
      
      Instead of doing all of that, we detect the ~0 case and just
      return !_PAGE_PRESENT.
      
      This bug has been in existence .. at least until 2.6.37 (yikes!)
      
      CC: stable@kernel.org
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      b7e5ffe5
    • Konrad Rzeszutek Wilk's avatar
      xen/apic: Return the APIC ID (and version) for CPU 0. · 558daa28
      Konrad Rzeszutek Wilk authored
      
      
      On x86_64 on AMD machines where the first APIC_ID is not zero, we get:
      
      ACPI: LAPIC (acpi_id[0x01] lapic_id[0x10] enabled)
      BIOS bug: APIC version is 0 for CPU 1/0x10, fixing up to 0x10
      BIOS bug: APIC version mismatch, boot CPU: 0, CPU 1: version 10
      
      which means that when the ACPI processor driver loads and
      tries to parse the _Pxx states it fails to do as, as it
      ends up calling acpi_get_cpuid which does this:
      
      for_each_possible_cpu(i) {
              if (cpu_physical_id(i) == apic_id)
                      return i;
      }
      
      And the bootup CPU, has not been found so it fails and returns -1
      for the first CPU - which then subsequently in the loop that
      "acpi_processor_get_info" does results in returning an error, which
      means that "acpi_processor_add" failing and per_cpu(processor)
      is never set (and is NULL).
      
      That means that when xen-acpi-processor tries to load (much much
      later on) and parse the P-states it gets -ENODEV from
      acpi_processor_register_performance() (which tries to read
      the per_cpu(processor)) and fails to parse the data.
      
      Reported-by-and-Tested-by: default avatarStefan Bader <stefan.bader@canonical.com>
      Suggested-by: default avatarBoris Ostrovsky <boris.ostrovsky@amd.com>
      [v2: Bit-shift APIC ID by 24 bits]
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      558daa28