Skip to content
  1. Oct 29, 2013
  2. Oct 20, 2013
  3. Oct 19, 2013
  4. Oct 18, 2013
  5. Oct 17, 2013
    • Rafael J. Wysocki's avatar
      ACPI / PM: Drop two functions that are not used any more · 2421ad48
      Rafael J. Wysocki authored
      
      
      Two functions defined in device_pm.c, acpi_dev_pm_add_dependent()
      and acpi_dev_pm_remove_dependent(), have no callers and may be
      dropped, so drop them.
      
      Moreover, they are the only functions adding entries to and removing
      entries from the power_dependent list in struct acpi_device, so drop
      that list too.
      
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      2421ad48
    • Aaron Lu's avatar
      ATA / ACPI: remove power dependent device handling · b08fc109
      Aaron Lu authored
      
      
      Previously, we wanted SCSI devices corrsponding to ATA devices to
      be runtime resumed when the power resource for those ATA device was
      turned on by some other device, so we added the SCSI device to the
      dependent device list of the ATA device's ACPI node.  However, this
      code has no effect after commit 41863fce (ACPI / power: Drop automaitc
      resume of power resource dependent devices) and the mechanism it was
      supposed to implement is regarded as a bad idea now, so drop it.
      
      [rjw: Changelog]
      Signed-off-by: default avatarAaron Lu <aaron.lu@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b08fc109
    • Linus Torvalds's avatar
      Merge branch 'akpm' (fixes from Andrew Morton) · 056cdce0
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton.
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (21 commits)
        mm: revert mremap pud_free anti-fix
        mm: fix BUG in __split_huge_page_pmd
        swap: fix set_blocksize race during swapon/swapoff
        procfs: call default get_unmapped_area on MMU-present architectures
        procfs: fix unintended truncation of returned mapped address
        writeback: fix negative bdi max pause
        percpu_refcount: export symbols
        fs: buffer: move allocation failure loop into the allocator
        mm: memcg: handle non-error OOM situations more gracefully
        tools/testing/selftests: fix uninitialized variable
        block/partitions/efi.c: treat size mismatch as a warning, not an error
        mm: hugetlb: initialize PG_reserved for tail pages of gigantic compound pages
        mm/zswap: bugfix: memory leak when re-swapon
        mm: /proc/pid/pagemap: inspect _PAGE_SOFT_DIRTY only on present pages
        mm: migration: do not lose soft dirty bit if page is in migration state
        gcov: MAINTAINERS: Add an entry for gcov
        mm/hugetlb.c: correct missing private flag clearing
        mm/vmscan.c: don't forget to free shrinker->nr_deferred
        ipc/sem.c: synchronize semop and semctl with IPC_RMID
        ipc: update locking scheme comments
        ...
      056cdce0
    • Hugh Dickins's avatar
      mm: revert mremap pud_free anti-fix · 57a8f0cd
      Hugh Dickins authored
      
      
      Revert commit 1ecfd533 ("mm/mremap.c: call pud_free() after fail
      calling pmd_alloc()").
      
      The original code was correct: pud_alloc(), pmd_alloc(), pte_alloc_map()
      ensure that the pud, pmd, pt is already allocated, and seldom do they
      need to allocate; on failure, upper levels are freed if appropriate by
      the subsequent do_munmap().  Whereas commit 1ecfd533 did an
      unconditional pud_free() of a most-likely still-in-use pud: saved only
      by the near-impossiblity of pmd_alloc() failing.
      
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Cc: Chen Gang <gang.chen@asianux.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      57a8f0cd
    • Hugh Dickins's avatar
      mm: fix BUG in __split_huge_page_pmd · 750e8165
      Hugh Dickins authored
      
      
      Occasionally we hit the BUG_ON(pmd_trans_huge(*pmd)) at the end of
      __split_huge_page_pmd(): seen when doing madvise(,,MADV_DONTNEED).
      
      It's invalid: we don't always have down_write of mmap_sem there: a racing
      do_huge_pmd_wp_page() might have copied-on-write to another huge page
      before our split_huge_page() got the anon_vma lock.
      
      Forget the BUG_ON, just go back and try again if this happens.
      
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Acked-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Cc: David Rientjes <rientjes@google.com>
      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>
      750e8165
    • Krzysztof Kozlowski's avatar
      swap: fix set_blocksize race during swapon/swapoff · 5b808a23
      Krzysztof Kozlowski authored
      
      
      Fix race between swapoff and swapon.  Swapoff used old_block_size from
      swap_info outside of swapon_mutex so it could be overwritten by
      concurrent swapon.
      
      The race has visible effect only if more than one swap block device
      exists with different block sizes (e.g.  /dev/sda1 with block size 4096
      and /dev/sdb1 with 512).  In such case it leads to setting the blocksize
      of swapped off device with wrong blocksize.
      
      The bug can be triggered with multiple concurrent swapoff and swapon:
      0. Swap for some device is on.
      1. swapoff:
      First the swapoff is called on this device and "struct swap_info_struct
      *p" is assigned. This is done under swap_lock however this lock is
      released for the call try_to_unuse().
      
      2. swapon:
      After the assignment above (and before acquiring swapon_mutex &
      swap_lock by swapoff) the swapon is called on the same device.
      The p->old_block_size is assigned to the value of block_size the device.
      This block size should be the same as previous but sometimes it is not.
      The swapon ends successfully.
      
      3. swapoff:
      Swapoff resumes, grabs the locks and mutex and continues to disable this
      swap device. Now it sets the block size to value taken from swap_info
      which was overwritten by swapon in 2.
      
      Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Reported-by: default avatarWeijie Yang <weijie.yang.kh@gmail.com>
      Cc: Bob Liu <bob.liu@oracle.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Shaohua Li <shli@fusionio.com>
      Cc: Minchan Kim <minchan@kernel.org>
      Acked-by: default avatarHugh Dickins <hughd@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5b808a23