1. 14 May, 2012 4 commits
  2. 11 May, 2012 3 commits
    • Benjamin Herrenschmidt's avatar
      powerpc/irq: Fix another case of lazy IRQ state getting out of sync · 7c0482e3
      Benjamin Herrenschmidt authored
      So we have another case of paca->irq_happened getting out of
      sync with the HW irq state. This can happen when a perfmon
      interrupt occurs while soft disabled, as it will return to a
      soft disabled but hard enabled context while leaving a stale
      PACA_IRQ_HARD_DIS flag set.
      
      This patch fixes it, and also adds a test for the condition
      of those flags being out of sync in arch_local_irq_restore()
      when CONFIG_TRACE_IRQFLAGS is enabled.
      
      This helps catching those gremlins faster (and so far I
      can't seem see any anymore, so that's good news).
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      7c0482e3
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu · 4e25651b
      Linus Torvalds authored
      Pull a m68knommu fix from Greg Ungerer:
       "It contains a single fix for including the ColdFire QSPI interface
        setup code when enabled as a module.  This was broken in the
        consolidation of the ColdFire SoC device tables in the 3.4 merge
        window."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
        m68knommu: enable qspi support when SPI_COLDFIRE_QSPI = m
      4e25651b
    • Hugh Dickins's avatar
      mm: raise MemFree by reverting percpu_pagelist_fraction to 0 · 1b76b02f
      Hugh Dickins authored
      Why is there less MemFree than there used to be?  It perturbed a test,
      so I've just been bisecting linux-next, and now find the offender went
      upstream yesterday.
      
      Commit 93278814 "mm: fix division by 0 in percpu_pagelist_fraction()"
      mistakenly initialized percpu_pagelist_fraction to the sysctl's minimum 8,
      which leaves 1/8th of memory on percpu lists (on each cpu??); but most of
      us expect it to be left unset at 0 (and it's not then used as a divisor).
      
        MemTotal: 8061476kB  8061476kB  8061476kB  8061476kB  8061476kB  8061476kB
        Repetitive test with percpu_pagelist_fraction 8:
        MemFree:  6948420kB  6237172kB  6949696kB  6840692kB  6949048kB  6862984kB
        Same test with percpu_pagelist_fraction back to 0:
        MemFree:  7945000kB  7944908kB  7948568kB  7949060kB  7948796kB  7948812kB
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      [ We really should fix the crazy sysctl interface too, but that's a
        separate thing - Linus ]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1b76b02f
  3. 10 May, 2012 23 commits
  4. 09 May, 2012 10 commits
    • Dan Carpenter's avatar
      cifs: fix revalidation test in cifs_llseek() · 48a5730e
      Dan Carpenter authored
      This test is always true so it means we revalidate the length every
      time, which generates more network traffic.  When it is SEEK_SET or
      SEEK_CUR, then we don't need to revalidate.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      48a5730e
    • 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
    • Catalin Marinas's avatar
      kmemleak: Fix the kmemleak tracking of the percpu areas with !SMP · 100d13c3
      Catalin Marinas authored
      Kmemleak tracks the percpu allocations via a specific API and the
      originally allocated areas must be removed from kmemleak (via
      kmemleak_free). The code was already doing this for SMP systems.
      Reported-by: default avatarSami Liedes <sami.liedes@iki.fi>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      100d13c3
    • Tejun Heo's avatar
      percpu: pcpu_embed_first_chunk() should free unused parts after all allocs are complete · 42b64281
      Tejun Heo authored
      pcpu_embed_first_chunk() allocates memory for each node, copies percpu
      data and frees unused portions of it before proceeding to the next
      group.  This assumes that allocations for different nodes doesn't
      overlap; however, depending on memory topology, the bootmem allocator
      may end up allocating memory from a different node than the requested
      one which may overlap with the portion freed from one of the previous
      percpu areas.  This leads to percpu groups for different nodes
      overlapping which is a serious bug.
      
      This patch separates out copy & partial free from the allocation loop
      such that all allocations are complete before partial frees happen.
      
      This also fixes overlapping frees which could happen on allocation
      failure path - out_free_areas path frees whole groups but the groups
      could have portions freed at that point.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: stable@vger.kernel.org
      Reported-by: default avatar"Pavel V. Panteleev" <pp_84@mail.ru>
      Tested-by: default avatar"Pavel V. Panteleev" <pp_84@mail.ru>
      LKML-Reference: <E1SNhwY-0007ui-V7.pp_84-mail-ru@f220.mail.ru>
      42b64281
    • 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
    • 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