Merge branch 'akpm' (Andrew's patch-bomb)
Merge misc fixes from Andrew Morton. * emailed from Andrew Morton <akpm@linux-foundation.org>: (8 patches) MAINTAINERS: add maintainer for LED subsystem mm: nobootmem: fix sign extend problem in __free_pages_memory() drivers/leds: correct __devexit annotations memcg: free spare array to avoid memory leak namespaces, pid_ns: fix leakage on fork() failure hugetlb: prevent BUG_ON in hugetlb_fault() -> hugetlb_cow() mm: fix division by 0 in percpu_pagelist_fraction() proc/pid/pagemap: correctly report non-present ptes and holes between vmas
This commit is contained in:
commit
7c283324da
9 changed files with 26 additions and 10 deletions
|
@ -4034,6 +4034,7 @@ F: Documentation/scsi/53c700.txt
|
||||||
F: drivers/scsi/53c700*
|
F: drivers/scsi/53c700*
|
||||||
|
|
||||||
LED SUBSYSTEM
|
LED SUBSYSTEM
|
||||||
|
M: Bryan Wu <bryan.wu@canonical.com>
|
||||||
M: Richard Purdie <rpurdie@rpsys.net>
|
M: Richard Purdie <rpurdie@rpsys.net>
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/leds/
|
F: drivers/leds/
|
||||||
|
|
|
@ -112,7 +112,7 @@ err_free_addr:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __devexit gpio_ext_free(struct netxbig_gpio_ext *gpio_ext)
|
static void gpio_ext_free(struct netxbig_gpio_ext *gpio_ext)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -294,7 +294,7 @@ static ssize_t netxbig_led_sata_show(struct device *dev,
|
||||||
|
|
||||||
static DEVICE_ATTR(sata, 0644, netxbig_led_sata_show, netxbig_led_sata_store);
|
static DEVICE_ATTR(sata, 0644, netxbig_led_sata_show, netxbig_led_sata_store);
|
||||||
|
|
||||||
static void __devexit delete_netxbig_led(struct netxbig_led_data *led_dat)
|
static void delete_netxbig_led(struct netxbig_led_data *led_dat)
|
||||||
{
|
{
|
||||||
if (led_dat->mode_val[NETXBIG_LED_SATA] != NETXBIG_LED_INVALID_MODE)
|
if (led_dat->mode_val[NETXBIG_LED_SATA] != NETXBIG_LED_INVALID_MODE)
|
||||||
device_remove_file(led_dat->cdev.dev, &dev_attr_sata);
|
device_remove_file(led_dat->cdev.dev, &dev_attr_sata);
|
||||||
|
|
|
@ -255,7 +255,7 @@ err_free_cmd:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __devexit delete_ns2_led(struct ns2_led_data *led_dat)
|
static void delete_ns2_led(struct ns2_led_data *led_dat)
|
||||||
{
|
{
|
||||||
device_remove_file(led_dat->cdev.dev, &dev_attr_sata);
|
device_remove_file(led_dat->cdev.dev, &dev_attr_sata);
|
||||||
led_classdev_unregister(&led_dat->cdev);
|
led_classdev_unregister(&led_dat->cdev);
|
||||||
|
|
|
@ -747,6 +747,8 @@ static void pte_to_pagemap_entry(pagemap_entry_t *pme, pte_t pte)
|
||||||
else if (pte_present(pte))
|
else if (pte_present(pte))
|
||||||
*pme = make_pme(PM_PFRAME(pte_pfn(pte))
|
*pme = make_pme(PM_PFRAME(pte_pfn(pte))
|
||||||
| PM_PSHIFT(PAGE_SHIFT) | PM_PRESENT);
|
| PM_PSHIFT(PAGE_SHIFT) | PM_PRESENT);
|
||||||
|
else
|
||||||
|
*pme = make_pme(PM_NOT_PRESENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||||
|
@ -761,6 +763,8 @@ static void thp_pmd_to_pagemap_entry(pagemap_entry_t *pme,
|
||||||
if (pmd_present(pmd))
|
if (pmd_present(pmd))
|
||||||
*pme = make_pme(PM_PFRAME(pmd_pfn(pmd) + offset)
|
*pme = make_pme(PM_PFRAME(pmd_pfn(pmd) + offset)
|
||||||
| PM_PSHIFT(PAGE_SHIFT) | PM_PRESENT);
|
| PM_PSHIFT(PAGE_SHIFT) | PM_PRESENT);
|
||||||
|
else
|
||||||
|
*pme = make_pme(PM_NOT_PRESENT);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static inline void thp_pmd_to_pagemap_entry(pagemap_entry_t *pme,
|
static inline void thp_pmd_to_pagemap_entry(pagemap_entry_t *pme,
|
||||||
|
@ -801,8 +805,10 @@ static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
|
||||||
|
|
||||||
/* check to see if we've left 'vma' behind
|
/* check to see if we've left 'vma' behind
|
||||||
* and need a new, higher one */
|
* and need a new, higher one */
|
||||||
if (vma && (addr >= vma->vm_end))
|
if (vma && (addr >= vma->vm_end)) {
|
||||||
vma = find_vma(walk->mm, addr);
|
vma = find_vma(walk->mm, addr);
|
||||||
|
pme = make_pme(PM_NOT_PRESENT);
|
||||||
|
}
|
||||||
|
|
||||||
/* check that 'vma' actually covers this address,
|
/* check that 'vma' actually covers this address,
|
||||||
* and that it isn't a huge page vma */
|
* and that it isn't a huge page vma */
|
||||||
|
@ -830,6 +836,8 @@ static void huge_pte_to_pagemap_entry(pagemap_entry_t *pme,
|
||||||
if (pte_present(pte))
|
if (pte_present(pte))
|
||||||
*pme = make_pme(PM_PFRAME(pte_pfn(pte) + offset)
|
*pme = make_pme(PM_PFRAME(pte_pfn(pte) + offset)
|
||||||
| PM_PSHIFT(PAGE_SHIFT) | PM_PRESENT);
|
| PM_PSHIFT(PAGE_SHIFT) | PM_PRESENT);
|
||||||
|
else
|
||||||
|
*pme = make_pme(PM_NOT_PRESENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function walks within one hugetlb entry in the single call */
|
/* This function walks within one hugetlb entry in the single call */
|
||||||
|
@ -839,7 +847,7 @@ static int pagemap_hugetlb_range(pte_t *pte, unsigned long hmask,
|
||||||
{
|
{
|
||||||
struct pagemapread *pm = walk->private;
|
struct pagemapread *pm = walk->private;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
pagemap_entry_t pme = make_pme(PM_NOT_PRESENT);
|
pagemap_entry_t pme;
|
||||||
|
|
||||||
for (; addr != end; addr += PAGE_SIZE) {
|
for (; addr != end; addr += PAGE_SIZE) {
|
||||||
int offset = (addr & ~hmask) >> PAGE_SHIFT;
|
int offset = (addr & ~hmask) >> PAGE_SHIFT;
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
#include <linux/audit.h>
|
#include <linux/audit.h>
|
||||||
#include <linux/memcontrol.h>
|
#include <linux/memcontrol.h>
|
||||||
#include <linux/ftrace.h>
|
#include <linux/ftrace.h>
|
||||||
|
#include <linux/proc_fs.h>
|
||||||
#include <linux/profile.h>
|
#include <linux/profile.h>
|
||||||
#include <linux/rmap.h>
|
#include <linux/rmap.h>
|
||||||
#include <linux/ksm.h>
|
#include <linux/ksm.h>
|
||||||
|
@ -1464,6 +1465,8 @@ bad_fork_cleanup_io:
|
||||||
if (p->io_context)
|
if (p->io_context)
|
||||||
exit_io_context(p);
|
exit_io_context(p);
|
||||||
bad_fork_cleanup_namespaces:
|
bad_fork_cleanup_namespaces:
|
||||||
|
if (unlikely(clone_flags & CLONE_NEWPID))
|
||||||
|
pid_ns_release_proc(p->nsproxy->pid_ns);
|
||||||
exit_task_namespaces(p);
|
exit_task_namespaces(p);
|
||||||
bad_fork_cleanup_mm:
|
bad_fork_cleanup_mm:
|
||||||
if (p->mm)
|
if (p->mm)
|
||||||
|
|
|
@ -2498,7 +2498,6 @@ retry_avoidcopy:
|
||||||
if (outside_reserve) {
|
if (outside_reserve) {
|
||||||
BUG_ON(huge_pte_none(pte));
|
BUG_ON(huge_pte_none(pte));
|
||||||
if (unmap_ref_private(mm, vma, old_page, address)) {
|
if (unmap_ref_private(mm, vma, old_page, address)) {
|
||||||
BUG_ON(page_count(old_page) != 1);
|
|
||||||
BUG_ON(huge_pte_none(pte));
|
BUG_ON(huge_pte_none(pte));
|
||||||
spin_lock(&mm->page_table_lock);
|
spin_lock(&mm->page_table_lock);
|
||||||
ptep = huge_pte_offset(mm, address & huge_page_mask(h));
|
ptep = huge_pte_offset(mm, address & huge_page_mask(h));
|
||||||
|
|
|
@ -4507,6 +4507,12 @@ static void mem_cgroup_usage_unregister_event(struct cgroup *cgrp,
|
||||||
swap_buffers:
|
swap_buffers:
|
||||||
/* Swap primary and spare array */
|
/* Swap primary and spare array */
|
||||||
thresholds->spare = thresholds->primary;
|
thresholds->spare = thresholds->primary;
|
||||||
|
/* If all events are unregistered, free the spare array */
|
||||||
|
if (!new) {
|
||||||
|
kfree(thresholds->spare);
|
||||||
|
thresholds->spare = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
rcu_assign_pointer(thresholds->primary, new);
|
rcu_assign_pointer(thresholds->primary, new);
|
||||||
|
|
||||||
/* To be sure that nobody uses thresholds */
|
/* To be sure that nobody uses thresholds */
|
||||||
|
|
|
@ -82,8 +82,7 @@ void __init free_bootmem_late(unsigned long addr, unsigned long size)
|
||||||
|
|
||||||
static void __init __free_pages_memory(unsigned long start, unsigned long end)
|
static void __init __free_pages_memory(unsigned long start, unsigned long end)
|
||||||
{
|
{
|
||||||
int i;
|
unsigned long i, start_aligned, end_aligned;
|
||||||
unsigned long start_aligned, end_aligned;
|
|
||||||
int order = ilog2(BITS_PER_LONG);
|
int order = ilog2(BITS_PER_LONG);
|
||||||
|
|
||||||
start_aligned = (start + (BITS_PER_LONG - 1)) & ~(BITS_PER_LONG - 1);
|
start_aligned = (start + (BITS_PER_LONG - 1)) & ~(BITS_PER_LONG - 1);
|
||||||
|
|
|
@ -105,7 +105,7 @@ unsigned long totalreserve_pages __read_mostly;
|
||||||
*/
|
*/
|
||||||
unsigned long dirty_balance_reserve __read_mostly;
|
unsigned long dirty_balance_reserve __read_mostly;
|
||||||
|
|
||||||
int percpu_pagelist_fraction;
|
int percpu_pagelist_fraction = 8;
|
||||||
gfp_t gfp_allowed_mask __read_mostly = GFP_BOOT_MASK;
|
gfp_t gfp_allowed_mask __read_mostly = GFP_BOOT_MASK;
|
||||||
|
|
||||||
#ifdef CONFIG_PM_SLEEP
|
#ifdef CONFIG_PM_SLEEP
|
||||||
|
@ -5203,7 +5203,7 @@ int percpu_pagelist_fraction_sysctl_handler(ctl_table *table, int write,
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = proc_dointvec_minmax(table, write, buffer, length, ppos);
|
ret = proc_dointvec_minmax(table, write, buffer, length, ppos);
|
||||||
if (!write || (ret == -EINVAL))
|
if (!write || (ret < 0))
|
||||||
return ret;
|
return ret;
|
||||||
for_each_populated_zone(zone) {
|
for_each_populated_zone(zone) {
|
||||||
for_each_possible_cpu(cpu) {
|
for_each_possible_cpu(cpu) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue