Skip to content
  1. Nov 15, 2013
  2. Nov 05, 2013
    • Geert Uytterhoeven's avatar
      openrisc: Refactor 16-bit constant relocation · 56aea88d
      Geert Uytterhoeven authored
      
      
      arch/openrisc/kernel/module.c: In function 'apply_relocate_add':
      arch/openrisc/kernel/module.c:50:13: warning: assignment from incompatible pointer type
      arch/openrisc/kernel/module.c:54:13: warning: assignment from incompatible pointer type
      
      Move the pointer increments to the dereference statements to avoid
      incompatible pointer assignments, and remove superfluous casts.
      
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarJonas Bonn <jonas@southpole.se>
      56aea88d
    • Chen Gang's avatar
      openrisc: include: asm: Kbuild: add default "vga.h" · f69405ce
      Chen Gang authored
      
      
      Add default "vga.h", or compiling fails with 'allmodconfig'.
      
      The related error:
      
          CC [M]  drivers/gpu/drm/drm_irq.o
        In file included from include/linux/vgaarb.h:34:0,
                         from drivers/gpu/drm/drm_irq.c:42:
        include/video/vga.h:22:21: fatal error: asm/vga.h: No such file or directory
        compilation terminated.
        make[3]: *** [drivers/gpu/drm/drm_irq.o] Error 1
        make[2]: *** [drivers/gpu/drm] Error 2
        make[1]: *** [drivers/gpu] Error 2
        make: *** [drivers] Error 2
      
      Signed-off-by: default avatarChen Gang <gang.chen@asianux.com>
      Signed-off-by: default avatarJonas Bonn <jonas@southpole.se>
      f69405ce
    • Chen Gang's avatar
      openrisc: Makefile: append "-D__linux__" to KBUILD_CFLAGS · ee4f96d0
      Chen Gang authored
      
      
      Need append "_D__linux__" to KBUILD_CFLAGS, just like some of another
      architectures have done, or 'allmodconfig' can not pass compiling.
      
      The related error:
      
          CC [M]  fs/coda/psdev.o
        In file included from include/linux/coda.h:65:0,
                         from fs/coda/psdev.c:45:
        include/uapi/linux/coda.h:221:2: error: expected specifier-qualifier-list before 'u_quad_t'
      
      The related compiler information:
      
        [root@dhcp122 ~]# /usr/local/bin/or32-linux-gcc -v
        Using built-in specs.
        COLLECT_GCC=/usr/local/bin/or32-linux-gcc
        COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/or32-linux/4.5.1-or32-1.0rc1/lto-wrapper
        Target: or32-linux
        Configured with: ../gcc-openrisc/configure --target=or32-linux --disable-nls --enable-languages=c --without-headers --disable-shared --disable-threads --enable-werror=no
        Thread model: single
        gcc version 4.5.1-or32-1.0rc1 (GCC)
      
      Signed-off-by: default avatarChen Gang <gang.chen@asianux.com>
      Signed-off-by: default avatarJonas Bonn <jonas@southpole.se>
      ee4f96d0
  3. Nov 04, 2013
    • Linus Torvalds's avatar
      Linux 3.12 · 5e01dc7b
      Linus Torvalds authored
      5e01dc7b
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 17f6ee43
      Linus Torvalds authored
      Pull MIPS fixes from Ralf Baechle:
       "Three fixes across arch/mips with the most complex one being the GIC
        interrupt fix - at nine lines still not monster.  I'm confident this
        are the final MIPS patches even if there should go for an rc8"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: ralink: fix return value check in rt_timer_probe()
        MIPS: malta: Fix GIC interrupt offsets
        MIPS: Perf: Fix 74K cache map
      17f6ee43
    • Mathias Krause's avatar
      ipc, msg: forbid negative values for "msg{max,mnb,mni}" · 9bf76ca3
      Mathias Krause authored
      
      
      Negative message lengths make no sense -- so don't do negative queue
      lenghts or identifier counts. Prevent them from getting negative.
      
      Also change the underlying data types to be unsigned to avoid hairy
      surprises with sign extensions in cases where those variables get
      evaluated in unsigned expressions with bigger data types, e.g size_t.
      
      In case a user still wants to have "unlimited" sizes she could just use
      INT_MAX instead.
      
      Signed-off-by: default avatarMathias Krause <minipli@googlemail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9bf76ca3
  4. Nov 03, 2013
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux · 9dc8c89d
      Linus Torvalds authored
      Pull ARM kallsyms fix from Rusty Russell:
       "Last minute perf unbreakage for ARM modules; spent a day in
        linux-next"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
        scripts/kallsyms: filter symbols not in kernel address space
      9dc8c89d
    • Vineet Gupta's avatar
      ARC: Incorrect mm reference used in vmalloc fault handler · 9c41f4ee
      Vineet Gupta authored
      A vmalloc fault needs to sync up PGD/PTE entry from init_mm to current
      task's "active_mm".  ARC vmalloc fault handler however was using mm.
      
      A vmalloc fault for non user task context (actually pre-userland, from
      init thread's open for /dev/console) caused the handler to deref NULL mm
      (for mm->pgd)
      
      The reasons it worked so far is amazing:
      
      1. By default (!SMP), vmalloc fault handler uses a cached value of PGD.
         In SMP that MMU register is repurposed hence need for mm pointer deref.
      
      2. In pre-3.12 SMP kernel, the problem triggering vmalloc didn't exist in
         pre-userland code path - it was introduced with commit 20bafb3d
      
      
         "n_tty: Move buffers into n_tty_data"
      
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      Cc: Gilad Ben-Yossef <gilad@benyossef.com>
      Cc: Noam Camus <noamc@ezchip.com>
      Cc: stable@vger.kernel.org    #3.10 and 3.11
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9c41f4ee
  5. Nov 02, 2013
  6. Nov 01, 2013
    • Linus Torvalds's avatar
      Merge branch 'akpm' (fixes from Andrew Morton) · 4f794ee8
      Linus Torvalds authored
      Merge four more fixes from Andrew Morton.
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        lib/scatterlist.c: don't flush_kernel_dcache_page on slab page
        mm: memcg: fix test for child groups
        mm: memcg: lockdep annotation for memcg OOM lock
        mm: memcg: use proper memcg in limit bypass
      4f794ee8
    • Ming Lei's avatar
      lib/scatterlist.c: don't flush_kernel_dcache_page on slab page · 3d77b50c
      Ming Lei authored
      Commit b1adaf65
      
       ("[SCSI] block: add sg buffer copy helper
      functions") introduces two sg buffer copy helpers, and calls
      flush_kernel_dcache_page() on pages in SG list after these pages are
      written to.
      
      Unfortunately, the commit may introduce a potential bug:
      
       - Before sending some SCSI commands, kmalloc() buffer may be passed to
         block layper, so flush_kernel_dcache_page() can see a slab page
         finally
      
       - According to cachetlb.txt, flush_kernel_dcache_page() is only called
         on "a user page", which surely can't be a slab page.
      
       - ARCH's implementation of flush_kernel_dcache_page() may use page
         mapping information to do optimization so page_mapping() will see the
         slab page, then VM_BUG_ON() is triggered.
      
      Aaro Koskinen reported the bug on ARM/kirkwood when DEBUG_VM is enabled,
      and this patch fixes the bug by adding test of '!PageSlab(miter->page)'
      before calling flush_kernel_dcache_page().
      
      Signed-off-by: default avatarMing Lei <ming.lei@canonical.com>
      Reported-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
      Tested-by: default avatarSimon Baatz <gmbnomis@gmail.com>
      Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: <stable@vger.kernel.org>	[3.2+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3d77b50c
    • Johannes Weiner's avatar
      mm: memcg: fix test for child groups · 696ac172
      Johannes Weiner authored
      
      
      When memcg code needs to know whether any given memcg has children, it
      uses the cgroup child iteration primitives and returns true/false
      depending on whether the iteration loop is executed at least once or
      not.
      
      Because a cgroup's list of children is RCU protected, these primitives
      require the RCU read-lock to be held, which is not the case for all
      memcg callers.  This results in the following splat when e.g.  enabling
      hierarchy mode:
      
        WARNING: CPU: 3 PID: 1 at kernel/cgroup.c:3043 css_next_child+0xa3/0x160()
        CPU: 3 PID: 1 Comm: systemd Not tainted 3.12.0-rc5-00117-g83f11a9-dirty #18
        Hardware name: LENOVO 3680B56/3680B56, BIOS 6QET69WW (1.39 ) 04/26/2012
        Call Trace:
          dump_stack+0x54/0x74
          warn_slowpath_common+0x78/0xa0
          warn_slowpath_null+0x1a/0x20
          css_next_child+0xa3/0x160
          mem_cgroup_hierarchy_write+0x5b/0xa0
          cgroup_file_write+0x108/0x2a0
          vfs_write+0xbd/0x1e0
          SyS_write+0x4c/0xa0
          system_call_fastpath+0x16/0x1b
      
      In the memcg case, we only care about children when we are attempting to
      modify inheritable attributes interactively.  Racing with deletion could
      mean a spurious -EBUSY, no problem.  Racing with addition is handled
      just fine as well through the memcg_create_mutex: if the child group is
      not on the list after the mutex is acquired, it won't be initialized
      from the parent's attributes until after the unlock.
      
      Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Acked-by: default avatarMichal Hocko <mhocko@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      696ac172
    • Johannes Weiner's avatar
      mm: memcg: lockdep annotation for memcg OOM lock · 0056f4e6
      Johannes Weiner authored
      
      
      The memcg OOM lock is a mutex-type lock that is open-coded due to
      memcg's special needs.  Add annotations for lockdep coverage.
      
      Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Cc: Michal Hocko <mhocko@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0056f4e6
    • Johannes Weiner's avatar
      mm: memcg: use proper memcg in limit bypass · 3168ecbe
      Johannes Weiner authored
      Commit 84235de3
      
       ("fs: buffer: move allocation failure loop into the
      allocator") allowed __GFP_NOFAIL allocations to bypass the limit if they
      fail to reclaim enough memory for the charge.  But because the main test
      case was on a 3.2-based system, the patch missed the fact that on newer
      kernels the charge function needs to return root_mem_cgroup when
      bypassing the limit, and not NULL.  This will corrupt whatever memory is
      at NULL + percpu pointer offset.  Fix this quickly before problems are
      reported.
      
      Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Acked-by: default avatarMichal Hocko <mhocko@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3168ecbe
    • Linus Torvalds's avatar
      vfs: decrapify dput(), fix cache behavior under normal load · 358eec18
      Linus Torvalds authored
      
      
      We do not want to dirty the dentry->d_flags cacheline in dput() just to
      set the DCACHE_REFERENCED flag when it is already set in the common case
      anyway.  This way the first cacheline of the dentry (which contains the
      RCU lookup information etc) can stay shared among multiple CPU's.
      
      This finishes off some of the details of all the scalability patches
      merged during the merge window.
      
      Also don't mark dentry_kill() for inlining, since it's the uncommon path
      and inlining it just makes the common path slower due to extra function
      entry/exit overhead.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      358eec18
    • Linus Torvalds's avatar
      i915: fix compiler warning · 0baab4fd
      Linus Torvalds authored
      The last i915 drm update brought with it this annoying warning
      
        drivers/gpu/drm/i915/intel_crt.c: In function ‘intel_crt_get_config’:
        drivers/gpu/drm/i915/intel_crt.c:110:21: warning: unused variable ‘dev’ [-Wunused-variable]
          struct drm_device *dev = encoder->base.dev;
                             ^
      
      introduced by commit 7195a50b
      
       ("drm/i915: Add HSW CRT output readout
      support").
      
      Remove the offending pointless variable.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0baab4fd
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 52469b4f
      Linus Torvalds authored
      Pull NUMA balancing memory corruption fixes from Ingo Molnar:
       "So these fixes are definitely not something I'd like to sit on, but as
        I said to Mel at the KS the timing is quite tight, with Linus planning
        v3.12-final within a week.
      
        Fedora-19 is affected:
      
         comet:~> grep NUMA_BALANCING /boot/config-3.11.3-201.fc19.x86_64
      
         CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
         CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
         CONFIG_NUMA_BALANCING=y
      
        AFAICS Ubuntu will be affected as well, once it updates the kernel:
      
         hubble:~> grep NUMA_BALANCING /boot/config-3.8.0-32-generic
      
         CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
         CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
         CONFIG_NUMA_BALANCING=y
      
        These 6 commits are a minimalized set of cherry-picks needed to fix
        the memory corruption bugs.  All commits are fixes, except "mm: numa:
        Sanitize task_numa_fault() callsites" which is a cleanup that made two
        followup fixes simpler.
      
        I've done targeted testing with just this SHA1 to try to make sure
        there are no cherry-picking artifacts.  The original non-cherry-picked
        set of fixes were exposed to linux-next for a couple of weeks"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        mm: Account for a THP NUMA hinting update as one PTE update
        mm: Close races between THP migration and PMD numa clearing
        mm: numa: Sanitize task_numa_fault() callsites
        mm: Prevent parallel splits during THP migration
        mm: Wait for THP migrations to complete during NUMA hinting faults
        mm: numa: Do not account for a hinting fault if we raced
      52469b4f