Merge branch 'akpm' (patches from Andrew Morton)
Merge misc fixes from Andrew Morton. * emailed patches from Andrew Morton akpm@linux-foundation.org>: MAINTAINERS: change mailing list address for Altera UART drivers Makefile: fix build with make 3.80 again MAINTAINERS: update L: misuses Makefile: fix extra parenthesis typo when CC_STACKPROTECTOR_REGULAR is enabled ipc,mqueue: remove limits for the amount of system-wide queues memcg: change oom_info_lock to mutex mm, thp: fix infinite loop on memcg OOM drivers/fmc/fmc-write-eeprom.c: fix decimal permissions drivers/iommu/omap-iommu-debug.c: fix decimal permissions mm, hwpoison: release page on PageHWPoison() in __do_fault()
This commit is contained in:
commit
d2a0476307
10 changed files with 40 additions and 38 deletions
|
@ -538,7 +538,7 @@ F: arch/alpha/
|
|||
ALTERA UART/JTAG UART SERIAL DRIVERS
|
||||
M: Tobias Klauser <tklauser@distanz.ch>
|
||||
L: linux-serial@vger.kernel.org
|
||||
L: nios2-dev@sopc.et.ntust.edu.tw (moderated for non-subscribers)
|
||||
L: nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
F: drivers/tty/serial/altera_uart.c
|
||||
F: drivers/tty/serial/altera_jtaguart.c
|
||||
|
@ -2611,9 +2611,9 @@ DC395x SCSI driver
|
|||
M: Oliver Neukum <oliver@neukum.org>
|
||||
M: Ali Akcaagac <aliakc@web.de>
|
||||
M: Jamie Lenehan <lenehan@twibble.org>
|
||||
W: http://twibble.org/dist/dc395x/
|
||||
L: dc395x@twibble.org
|
||||
L: http://lists.twibble.org/mailman/listinfo/dc395x/
|
||||
W: http://twibble.org/dist/dc395x/
|
||||
W: http://lists.twibble.org/mailman/listinfo/dc395x/
|
||||
S: Maintained
|
||||
F: Documentation/scsi/dc395x.txt
|
||||
F: drivers/scsi/dc395x.*
|
||||
|
@ -8443,8 +8443,8 @@ TARGET SUBSYSTEM
|
|||
M: Nicholas A. Bellinger <nab@linux-iscsi.org>
|
||||
L: linux-scsi@vger.kernel.org
|
||||
L: target-devel@vger.kernel.org
|
||||
L: http://groups.google.com/group/linux-iscsi-target-dev
|
||||
W: http://www.linux-iscsi.org
|
||||
W: http://groups.google.com/group/linux-iscsi-target-dev
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master
|
||||
S: Supported
|
||||
F: drivers/target/
|
||||
|
|
8
Makefile
8
Makefile
|
@ -605,10 +605,11 @@ endif
|
|||
ifdef CONFIG_CC_STACKPROTECTOR_REGULAR
|
||||
stackp-flag := -fstack-protector
|
||||
ifeq ($(call cc-option, $(stackp-flag)),)
|
||||
$(warning Cannot use CONFIG_CC_STACKPROTECTOR: \
|
||||
-fstack-protector not supported by compiler))
|
||||
$(warning Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: \
|
||||
-fstack-protector not supported by compiler)
|
||||
endif
|
||||
else ifdef CONFIG_CC_STACKPROTECTOR_STRONG
|
||||
else
|
||||
ifdef CONFIG_CC_STACKPROTECTOR_STRONG
|
||||
stackp-flag := -fstack-protector-strong
|
||||
ifeq ($(call cc-option, $(stackp-flag)),)
|
||||
$(warning Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: \
|
||||
|
@ -618,6 +619,7 @@ else
|
|||
# Force off for distro compilers that enable stack protector by default.
|
||||
stackp-flag := $(call cc-option, -fno-stack-protector)
|
||||
endif
|
||||
endif
|
||||
KBUILD_CFLAGS += $(stackp-flag)
|
||||
|
||||
# This warning generated too much noise in a regular build.
|
||||
|
|
|
@ -27,7 +27,7 @@ FMC_PARAM_BUSID(fwe_drv);
|
|||
/* The "file=" is like the generic "gateware=" used elsewhere */
|
||||
static char *fwe_file[FMC_MAX_CARDS];
|
||||
static int fwe_file_n;
|
||||
module_param_array_named(file, fwe_file, charp, &fwe_file_n, 444);
|
||||
module_param_array_named(file, fwe_file, charp, &fwe_file_n, 0444);
|
||||
|
||||
static int fwe_run_tlv(struct fmc_device *fmc, const struct firmware *fw,
|
||||
int write)
|
||||
|
|
|
@ -354,8 +354,8 @@ DEBUG_FOPS(mem);
|
|||
return -ENOMEM; \
|
||||
}
|
||||
|
||||
#define DEBUG_ADD_FILE(name) __DEBUG_ADD_FILE(name, 600)
|
||||
#define DEBUG_ADD_FILE_RO(name) __DEBUG_ADD_FILE(name, 400)
|
||||
#define DEBUG_ADD_FILE(name) __DEBUG_ADD_FILE(name, 0600)
|
||||
#define DEBUG_ADD_FILE_RO(name) __DEBUG_ADD_FILE(name, 0400)
|
||||
|
||||
static int iommu_debug_register(struct device *dev, void *data)
|
||||
{
|
||||
|
|
|
@ -118,9 +118,7 @@ extern int mq_init_ns(struct ipc_namespace *ns);
|
|||
* the new maximum will handle anyone else. I may have to revisit this
|
||||
* in the future.
|
||||
*/
|
||||
#define MIN_QUEUESMAX 1
|
||||
#define DFLT_QUEUESMAX 256
|
||||
#define HARD_QUEUESMAX 1024
|
||||
#define MIN_MSGMAX 1
|
||||
#define DFLT_MSG 10U
|
||||
#define DFLT_MSGMAX 10
|
||||
|
|
|
@ -22,6 +22,16 @@ static void *get_mq(ctl_table *table)
|
|||
return which;
|
||||
}
|
||||
|
||||
static int proc_mq_dointvec(ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
{
|
||||
struct ctl_table mq_table;
|
||||
memcpy(&mq_table, table, sizeof(mq_table));
|
||||
mq_table.data = get_mq(table);
|
||||
|
||||
return proc_dointvec(&mq_table, write, buffer, lenp, ppos);
|
||||
}
|
||||
|
||||
static int proc_mq_dointvec_minmax(ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
{
|
||||
|
@ -33,12 +43,10 @@ static int proc_mq_dointvec_minmax(ctl_table *table, int write,
|
|||
lenp, ppos);
|
||||
}
|
||||
#else
|
||||
#define proc_mq_dointvec NULL
|
||||
#define proc_mq_dointvec_minmax NULL
|
||||
#endif
|
||||
|
||||
static int msg_queues_limit_min = MIN_QUEUESMAX;
|
||||
static int msg_queues_limit_max = HARD_QUEUESMAX;
|
||||
|
||||
static int msg_max_limit_min = MIN_MSGMAX;
|
||||
static int msg_max_limit_max = HARD_MSGMAX;
|
||||
|
||||
|
@ -51,9 +59,7 @@ static ctl_table mq_sysctls[] = {
|
|||
.data = &init_ipc_ns.mq_queues_max,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_mq_dointvec_minmax,
|
||||
.extra1 = &msg_queues_limit_min,
|
||||
.extra2 = &msg_queues_limit_max,
|
||||
.proc_handler = proc_mq_dointvec,
|
||||
},
|
||||
{
|
||||
.procname = "msg_max",
|
||||
|
|
|
@ -433,9 +433,9 @@ static int mqueue_create(struct inode *dir, struct dentry *dentry,
|
|||
error = -EACCES;
|
||||
goto out_unlock;
|
||||
}
|
||||
if (ipc_ns->mq_queues_count >= HARD_QUEUESMAX ||
|
||||
(ipc_ns->mq_queues_count >= ipc_ns->mq_queues_max &&
|
||||
!capable(CAP_SYS_RESOURCE))) {
|
||||
|
||||
if (ipc_ns->mq_queues_count >= ipc_ns->mq_queues_max &&
|
||||
!capable(CAP_SYS_RESOURCE)) {
|
||||
error = -ENOSPC;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
|
|
@ -1166,8 +1166,10 @@ int do_huge_pmd_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
|||
} else {
|
||||
ret = do_huge_pmd_wp_page_fallback(mm, vma, address,
|
||||
pmd, orig_pmd, page, haddr);
|
||||
if (ret & VM_FAULT_OOM)
|
||||
if (ret & VM_FAULT_OOM) {
|
||||
split_huge_page(page);
|
||||
ret |= VM_FAULT_FALLBACK;
|
||||
}
|
||||
put_page(page);
|
||||
}
|
||||
count_vm_event(THP_FAULT_FALLBACK);
|
||||
|
@ -1179,9 +1181,10 @@ int do_huge_pmd_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
|||
if (page) {
|
||||
split_huge_page(page);
|
||||
put_page(page);
|
||||
}
|
||||
} else
|
||||
split_huge_page_pmd(vma, address, pmd);
|
||||
ret |= VM_FAULT_FALLBACK;
|
||||
count_vm_event(THP_FAULT_FALLBACK);
|
||||
ret |= VM_FAULT_OOM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
|
@ -1687,7 +1687,7 @@ void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
|
|||
* protects memcg_name and makes sure that parallel ooms do not
|
||||
* interleave
|
||||
*/
|
||||
static DEFINE_SPINLOCK(oom_info_lock);
|
||||
static DEFINE_MUTEX(oom_info_lock);
|
||||
struct cgroup *task_cgrp;
|
||||
struct cgroup *mem_cgrp;
|
||||
static char memcg_name[PATH_MAX];
|
||||
|
@ -1698,7 +1698,7 @@ void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
|
|||
if (!p)
|
||||
return;
|
||||
|
||||
spin_lock(&oom_info_lock);
|
||||
mutex_lock(&oom_info_lock);
|
||||
rcu_read_lock();
|
||||
|
||||
mem_cgrp = memcg->css.cgroup;
|
||||
|
@ -1767,7 +1767,7 @@ void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
|
|||
|
||||
pr_cont("\n");
|
||||
}
|
||||
spin_unlock(&oom_info_lock);
|
||||
mutex_unlock(&oom_info_lock);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
15
mm/memory.c
15
mm/memory.c
|
@ -3348,6 +3348,7 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
|
|||
if (ret & VM_FAULT_LOCKED)
|
||||
unlock_page(vmf.page);
|
||||
ret = VM_FAULT_HWPOISON;
|
||||
page_cache_release(vmf.page);
|
||||
goto uncharge_out;
|
||||
}
|
||||
|
||||
|
@ -3703,7 +3704,6 @@ static int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
|
|||
if (unlikely(is_vm_hugetlb_page(vma)))
|
||||
return hugetlb_fault(mm, vma, address, flags);
|
||||
|
||||
retry:
|
||||
pgd = pgd_offset(mm, address);
|
||||
pud = pud_alloc(mm, pgd, address);
|
||||
if (!pud)
|
||||
|
@ -3741,20 +3741,13 @@ static int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
|
|||
if (dirty && !pmd_write(orig_pmd)) {
|
||||
ret = do_huge_pmd_wp_page(mm, vma, address, pmd,
|
||||
orig_pmd);
|
||||
/*
|
||||
* If COW results in an oom, the huge pmd will
|
||||
* have been split, so retry the fault on the
|
||||
* pte for a smaller charge.
|
||||
*/
|
||||
if (unlikely(ret & VM_FAULT_OOM))
|
||||
goto retry;
|
||||
return ret;
|
||||
if (!(ret & VM_FAULT_FALLBACK))
|
||||
return ret;
|
||||
} else {
|
||||
huge_pmd_set_accessed(mm, vma, address, pmd,
|
||||
orig_pmd, dirty);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue