1. 17 Oct, 2013 7 commits
    • Cyrill Gorcunov's avatar
      mm: migration: do not lose soft dirty bit if page is in migration state · c3d16e16
      Cyrill Gorcunov authored
      If page migration is turned on in config and the page is migrating, we
      may lose the soft dirty bit.  If fork and mprotect are called on
      migrating pages (once migration is complete) pages do not obtain the
      soft dirty bit in the correspond pte entries.  Fix it adding an
      appropriate test on swap entries.
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
      Cc: Pavel Emelyanov <xemul@parallels.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Matt Mackall <mpm@selenic.com>
      Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c3d16e16
    • Peter Oberparleiter's avatar
    • Joonsoo Kim's avatar
      mm/hugetlb.c: correct missing private flag clearing · 16c794b4
      Joonsoo Kim authored
      We should clear the page's private flag when returing the page to the
      hugepage pool.  Otherwise, marked hugepage can be allocated to the user
      who tries to allocate the non-reserved hugepage.  If this user fail to
      map this hugepage, he would try to return the page to the hugepage pool.
      Since this page has a private flag, resv_huge_pages would mistakenly
      increase.  This patch fixes this situation.
      Signed-off-by: default avatarJoonsoo Kim <iamjoonsoo.kim@lge.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Michal Hocko <mhocko@suse.cz>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Davidlohr Bueso <davidlohr.bueso@hp.com>
      Cc: David Gibson <david@gibson.dropbear.id.au>
      Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com>
      Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Cc: Hillf Danton <dhillf@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      16c794b4
    • Andrew Vagin's avatar
      mm/vmscan.c: don't forget to free shrinker->nr_deferred · ae393321
      Andrew Vagin authored
      This leak was added by commit 1d3d4437 ("vmscan: per-node deferred
      work").
      
      unreferenced object 0xffff88006ada3bd0 (size 8):
        comm "criu", pid 14781, jiffies 4295238251 (age 105.641s)
        hex dump (first 8 bytes):
          00 00 00 00 00 00 00 00                          ........
        backtrace:
          [<ffffffff8170caee>] kmemleak_alloc+0x5e/0xc0
          [<ffffffff811c0527>] __kmalloc+0x247/0x310
          [<ffffffff8117848c>] register_shrinker+0x3c/0xa0
          [<ffffffff811e115b>] sget+0x5ab/0x670
          [<ffffffff812532f4>] proc_mount+0x54/0x170
          [<ffffffff811e1893>] mount_fs+0x43/0x1b0
          [<ffffffff81202dd2>] vfs_kern_mount+0x72/0x110
          [<ffffffff81202e89>] kern_mount_data+0x19/0x30
          [<ffffffff812530a0>] pid_ns_prepare_proc+0x20/0x40
          [<ffffffff81083c56>] alloc_pid+0x466/0x4a0
          [<ffffffff8105aeda>] copy_process+0xc6a/0x1860
          [<ffffffff8105beab>] do_fork+0x8b/0x370
          [<ffffffff8105c1a6>] SyS_clone+0x16/0x20
          [<ffffffff8171f739>] stub_clone+0x69/0x90
          [<ffffffffffffffff>] 0xffffffffffffffff
      Signed-off-by: default avatarAndrew Vagin <avagin@openvz.org>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Michal Hocko <mhocko@suse.cz>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Glauber Costa <glommer@openvz.org>
      Cc: Chuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ae393321
    • Manfred Spraul's avatar
      ipc/sem.c: synchronize semop and semctl with IPC_RMID · 6e224f94
      Manfred Spraul authored
      After acquiring the semlock spinlock, operations must test that the
      array is still valid.
      
       - semctl() and exit_sem() would walk stale linked lists (ugly, but
         should be ok: all lists are empty)
      
       - semtimedop() would sleep forever - and if woken up due to a signal -
         access memory after free.
      
      The patch also:
       - standardizes the tests for .deleted, so that all tests in one
         function leave the function with the same approach.
       - unconditionally tests for .deleted immediately after every call to
         sem_lock - even it it means that for semctl(GETALL), .deleted will be
         tested twice.
      
      Both changes make the review simpler: After every sem_lock, there must
      be a test of .deleted, followed by a goto to the cleanup code (if the
      function uses "goto cleanup").
      
      The only exception is semctl_down(): If sem_ids().rwsem is locked, then
      the presence in ids->ipcs_idr is equivalent to !.deleted, thus no
      additional test is required.
      Signed-off-by: default avatarManfred Spraul <manfred@colorfullife.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Acked-by: default avatarDavidlohr Bueso <davidlohr@hp.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6e224f94
    • Davidlohr Bueso's avatar
      ipc: update locking scheme comments · 18ccee26
      Davidlohr Bueso authored
      The initial documentation was a bit incomplete, update accordingly.
      
      [akpm@linux-foundation.org: make it more readable in 80 columns]
      Signed-off-by: default avatarDavidlohr Bueso <davidlohr@hp.com>
      Acked-by: default avatarManfred Spraul <manfred@colorfullife.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      18ccee26
    • David Rientjes's avatar
      mm, memcg: protect mem_cgroup_read_events for cpu hotplug · 9c567512
      David Rientjes authored
      for_each_online_cpu() needs the protection of {get,put}_online_cpus() so
      cpu_online_mask doesn't change during the iteration.
      
      cpu_hotplug.lock is held while a cpu is going down, it's a coarse lock
      that is used kernel-wide to synchronize cpu hotplug activity.  Memcg has
      a cpu hotplug notifier, called while there may not be any cpu hotplug
      refcounts, which drains per-cpu event counts to memcg->nocpu_base.events
      to maintain a cumulative event count as cpus disappear.  Without
      get_online_cpus() in mem_cgroup_read_events(), it's possible to account
      for the event count on a dying cpu twice, and this value may be
      significantly large.
      
      In fact, all memcg->pcp_counter_lock use should be nested by
      {get,put}_online_cpus().
      
      This fixes that issue and ensures the reported statistics are not vastly
      over-reported during cpu hotplug.
      Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Michal Hocko <mhocko@suse.cz>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Acked-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9c567512
  2. 16 Oct, 2013 2 commits
    • Linus Torvalds's avatar
      Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux · 34ec4de4
      Linus Torvalds authored
      Pull device tree fixes and reverts from Grant Likely:
       "One bug fix and three reverts.  The reverts back out the slightly
        controversial feeding the entire device tree into the random pool and
        the reserved-memory binding which isn't fully baked yet.  Expect the
        reserved-memory patches at least to resurface for v3.13.
      
        The bug fixes removes a scary but harmless warning on SPARC that was
        introduced in the v3.12 merge window.  v3.13 will contain a proper fix
        that makes the new code work on SPARC.
      
        On the plus side, the diffstat looks *awesome*.  I love removing lines
        of code"
      
      * tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux:
        Revert "drivers: of: add initialization code for dma reserved memory"
        Revert "ARM: init: add support for reserved memory defined by device tree"
        Revert "of: Feed entire flattened device tree into the random pool"
        of: fix unnecessary warning on missing /cpus node
      34ec4de4
    • Linus Torvalds's avatar
      Merge branch 'fixes-for-v3.12' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping · ba0a062e
      Linus Torvalds authored
      Pull DMA-mapping fix from Marek Szyprowski:
       "A bugfix for the IOMMU-based implementation of dma-mapping subsystem
        for ARM architecture"
      
      * 'fixes-for-v3.12' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
        ARM: dma-mapping: Always pass proper prot flags to iommu_map()
      ba0a062e
  3. 15 Oct, 2013 7 commits
  4. 14 Oct, 2013 7 commits
    • Roland Dreier's avatar
      Merge branch 'misc' into for-next · 59b5b28d
      Roland Dreier authored
      59b5b28d
    • Joe Perches's avatar
      IB: Remove unnecessary semicolons · 2b50176d
      Joe Perches authored
      These aren't necessary after switch blocks.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      2b50176d
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm · d6099aeb
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "Some more ARM fixes, nothing particularly major here.  The biggest
        change is to fix the SMP_ON_UP code so that it works with TI's Aegis
        cores"
      
      * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: 7851/1: check for number of arguments in syscall_get/set_arguments()
        ARM: 7846/1: Update SMP_ON_UP code to detect A9MPCore with 1 CPU devices
        ARM: 7845/1: sharpsl_param.c: fix invalid memory access for pxa devices
        ARM: 7843/1: drop asm/types.h from generic-y
        ARM: 7842/1: MCPM: don't explode if invoked without being initialized first
      d6099aeb
    • Linus Torvalds's avatar
      Merge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux · 4b60667a
      Linus Torvalds authored
      Pull SLAB fix from Pekka Enberg:
       "A regression fix for overly eager slab cache name checks"
      
      * 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux:
        slab_common: Do not check for duplicate slab names
      4b60667a
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-3.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 35f9162d
      Linus Torvalds authored
      Pull ACPI and power management fixes from Rafael Wysocki:
       "These fix two recent bugs in ACPIPHP (ACPI-based PCI hotplug) and
        update a bunch of web links and e-mail addresses in MAINTAINERS, docs
        and Kconfig that either are stale or will expire soon.
      
        Specifics:
      
         - The WARN_ON() in acpiphp_enumerate_slots() triggers as a false
           positive in some cases, so drop it.
      
         - Add a missing pci_dev_put() to an error code path in
           acpiphp_enumerate_slots().
      
         - Replace my old e-mail address that's going to expire with a new
           one.
      
         - Update ACPI web links and git tree information in MAINTAINERS.
      
         - Update links to the Linux-ACPI project's page in MAINTAINERS.
      
         - Update some stale links and e-mail addresses under Documentation
           and in the ACPI Kconfig file"
      
      * tag 'pm+acpi-3.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / hotplug / PCI: Drop WARN_ON() from acpiphp_enumerate_slots()
        ACPI / hotplug / PCI: Fix error code path in acpiphp_enumerate_slots()
        ACPI / PM / Documentation: Replace outdated project links and addresses
        MAINTAINERS / ACPI: Update links to the Linux-ACPI project web page
        MAINTAINERS / ACPI: Update links and git tree information
        MAINTAINERS / Documentation: Update Rafael's e-mail address
      35f9162d
    • Grant Likely's avatar
      Revert "of: Feed entire flattened device tree into the random pool" · b920ecc8
      Grant Likely authored
      This reverts commit 109b6236.
      
      Tim Bird expressed concern that this will have a bad effect on boot
      time, and while simple tests have shown it to be okay with simple tree,
      a device tree blob can potentially be quite large and
      add_device_randomness() is not a fast function. Rather than do this for
      all platforms unconditionally, I'm reverting this patch and would like
      to see it revisited. Instead of feeding the entire tree into the random
      pool, it would probably be appropriate to hash the tree and feed the
      hash result into the pool. There really isn't a lot of randomness in a
      device tree anyway. In the majority of cases only a handful of
      properties are going to be different between machines with the same
      baseboard.
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      b920ecc8
    • Grant Likely's avatar
      of: fix unnecessary warning on missing /cpus node · 444c91e5
      Grant Likely authored
      Not all DT platforms have all the cpus collected under a /cpus node.
      That just happens to be a details of FDT, ePAPR and PowerPC platforms.
      Sparc does something different, but unfortunately the current code
      complains with a warning if /cpus isn't there. This became a problem
      with commit f86e4718, "driver/core cpu: initialize of_node in cpu's
      device structure", which caused the function to get called for all
      architectures.
      
      This commit is a temporary fix to fail silently if the cpus node isn't
      present. A proper fix will come later to allow arch code to provide a
      custom mechanism for decoding the CPU hwid if the 'reg' property isn't
      appropriate.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>
      Cc: Rob Herring <rob.herring@calxeda.com>
      444c91e5
  5. 13 Oct, 2013 17 commits