Skip to content

Commit d2a0476

Browse files
committed
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()
2 parents 6dba6ec + 61bd094 commit d2a0476

10 files changed

Lines changed: 40 additions & 38 deletions

File tree

‎MAINTAINERS‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ F: arch/alpha/
538538
ALTERA UART/JTAG UART SERIAL DRIVERS
539539
M: Tobias Klauser <tklauser@distanz.ch>
540540
L: linux-serial@vger.kernel.org
541-
L: nios2-dev@sopc.et.ntust.edu.tw (moderated for non-subscribers)
541+
L: nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
542542
S: Maintained
543543
F: drivers/tty/serial/altera_uart.c
544544
F: drivers/tty/serial/altera_jtaguart.c
@@ -2611,9 +2611,9 @@ DC395x SCSI driver
26112611
M: Oliver Neukum <oliver@neukum.org>
26122612
M: Ali Akcaagac <aliakc@web.de>
26132613
M: Jamie Lenehan <lenehan@twibble.org>
2614-
W: http://twibble.org/dist/dc395x/
26152614
L: dc395x@twibble.org
2616-
L: http://lists.twibble.org/mailman/listinfo/dc395x/
2615+
W: http://twibble.org/dist/dc395x/
2616+
W: http://lists.twibble.org/mailman/listinfo/dc395x/
26172617
S: Maintained
26182618
F: Documentation/scsi/dc395x.txt
26192619
F: drivers/scsi/dc395x.*
@@ -8443,8 +8443,8 @@ TARGET SUBSYSTEM
84438443
M: Nicholas A. Bellinger <nab@linux-iscsi.org>
84448444
L: linux-scsi@vger.kernel.org
84458445
L: target-devel@vger.kernel.org
8446-
L: http://groups.google.com/group/linux-iscsi-target-dev
84478446
W: http://www.linux-iscsi.org
8447+
W: http://groups.google.com/group/linux-iscsi-target-dev
84488448
T: git git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master
84498449
S: Supported
84508450
F: drivers/target/

‎Makefile‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -605,10 +605,11 @@ endif
605605
ifdef CONFIG_CC_STACKPROTECTOR_REGULAR
606606
stackp-flag := -fstack-protector
607607
ifeq ($(call cc-option, $(stackp-flag)),)
608-
$(warning Cannot use CONFIG_CC_STACKPROTECTOR: \
609-
-fstack-protector not supported by compiler))
608+
$(warning Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: \
609+
-fstack-protector not supported by compiler)
610610
endif
611-
else ifdef CONFIG_CC_STACKPROTECTOR_STRONG
611+
else
612+
ifdef CONFIG_CC_STACKPROTECTOR_STRONG
612613
stackp-flag := -fstack-protector-strong
613614
ifeq ($(call cc-option, $(stackp-flag)),)
614615
$(warning Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: \
@@ -618,6 +619,7 @@ else
618619
# Force off for distro compilers that enable stack protector by default.
619620
stackp-flag := $(call cc-option, -fno-stack-protector)
620621
endif
622+
endif
621623
KBUILD_CFLAGS += $(stackp-flag)
622624

623625
# This warning generated too much noise in a regular build.

‎drivers/fmc/fmc-write-eeprom.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ FMC_PARAM_BUSID(fwe_drv);
2727
/* The "file=" is like the generic "gateware=" used elsewhere */
2828
static char *fwe_file[FMC_MAX_CARDS];
2929
static int fwe_file_n;
30-
module_param_array_named(file, fwe_file, charp, &fwe_file_n, 444);
30+
module_param_array_named(file, fwe_file, charp, &fwe_file_n, 0444);
3131

3232
static int fwe_run_tlv(struct fmc_device *fmc, const struct firmware *fw,
3333
int write)

‎drivers/iommu/omap-iommu-debug.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,8 @@ DEBUG_FOPS(mem);
354354
return -ENOMEM; \
355355
}
356356

357-
#define DEBUG_ADD_FILE(name) __DEBUG_ADD_FILE(name, 600)
358-
#define DEBUG_ADD_FILE_RO(name) __DEBUG_ADD_FILE(name, 400)
357+
#define DEBUG_ADD_FILE(name) __DEBUG_ADD_FILE(name, 0600)
358+
#define DEBUG_ADD_FILE_RO(name) __DEBUG_ADD_FILE(name, 0400)
359359

360360
static int iommu_debug_register(struct device *dev, void *data)
361361
{

‎include/linux/ipc_namespace.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@ extern int mq_init_ns(struct ipc_namespace *ns);
118118
* the new maximum will handle anyone else. I may have to revisit this
119119
* in the future.
120120
*/
121-
#define MIN_QUEUESMAX 1
122121
#define DFLT_QUEUESMAX 256
123-
#define HARD_QUEUESMAX 1024
124122
#define MIN_MSGMAX 1
125123
#define DFLT_MSG 10U
126124
#define DFLT_MSGMAX 10

‎ipc/mq_sysctl.c‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ static void *get_mq(ctl_table *table)
2222
return which;
2323
}
2424

25+
static int proc_mq_dointvec(ctl_table *table, int write,
26+
void __user *buffer, size_t *lenp, loff_t *ppos)
27+
{
28+
struct ctl_table mq_table;
29+
memcpy(&mq_table, table, sizeof(mq_table));
30+
mq_table.data = get_mq(table);
31+
32+
return proc_dointvec(&mq_table, write, buffer, lenp, ppos);
33+
}
34+
2535
static int proc_mq_dointvec_minmax(ctl_table *table, int write,
2636
void __user *buffer, size_t *lenp, loff_t *ppos)
2737
{
@@ -33,12 +43,10 @@ static int proc_mq_dointvec_minmax(ctl_table *table, int write,
3343
lenp, ppos);
3444
}
3545
#else
46+
#define proc_mq_dointvec NULL
3647
#define proc_mq_dointvec_minmax NULL
3748
#endif
3849

39-
static int msg_queues_limit_min = MIN_QUEUESMAX;
40-
static int msg_queues_limit_max = HARD_QUEUESMAX;
41-
4250
static int msg_max_limit_min = MIN_MSGMAX;
4351
static int msg_max_limit_max = HARD_MSGMAX;
4452

@@ -51,9 +59,7 @@ static ctl_table mq_sysctls[] = {
5159
.data = &init_ipc_ns.mq_queues_max,
5260
.maxlen = sizeof(int),
5361
.mode = 0644,
54-
.proc_handler = proc_mq_dointvec_minmax,
55-
.extra1 = &msg_queues_limit_min,
56-
.extra2 = &msg_queues_limit_max,
62+
.proc_handler = proc_mq_dointvec,
5763
},
5864
{
5965
.procname = "msg_max",

‎ipc/mqueue.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,9 @@ static int mqueue_create(struct inode *dir, struct dentry *dentry,
433433
error = -EACCES;
434434
goto out_unlock;
435435
}
436-
if (ipc_ns->mq_queues_count >= HARD_QUEUESMAX ||
437-
(ipc_ns->mq_queues_count >= ipc_ns->mq_queues_max &&
438-
!capable(CAP_SYS_RESOURCE))) {
436+
437+
if (ipc_ns->mq_queues_count >= ipc_ns->mq_queues_max &&
438+
!capable(CAP_SYS_RESOURCE)) {
439439
error = -ENOSPC;
440440
goto out_unlock;
441441
}

‎mm/huge_memory.c‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,8 +1166,10 @@ int do_huge_pmd_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
11661166
} else {
11671167
ret = do_huge_pmd_wp_page_fallback(mm, vma, address,
11681168
pmd, orig_pmd, page, haddr);
1169-
if (ret & VM_FAULT_OOM)
1169+
if (ret & VM_FAULT_OOM) {
11701170
split_huge_page(page);
1171+
ret |= VM_FAULT_FALLBACK;
1172+
}
11711173
put_page(page);
11721174
}
11731175
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,
11791181
if (page) {
11801182
split_huge_page(page);
11811183
put_page(page);
1182-
}
1184+
} else
1185+
split_huge_page_pmd(vma, address, pmd);
1186+
ret |= VM_FAULT_FALLBACK;
11831187
count_vm_event(THP_FAULT_FALLBACK);
1184-
ret |= VM_FAULT_OOM;
11851188
goto out;
11861189
}
11871190

‎mm/memcontrol.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,7 +1687,7 @@ void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
16871687
* protects memcg_name and makes sure that parallel ooms do not
16881688
* interleave
16891689
*/
1690-
static DEFINE_SPINLOCK(oom_info_lock);
1690+
static DEFINE_MUTEX(oom_info_lock);
16911691
struct cgroup *task_cgrp;
16921692
struct cgroup *mem_cgrp;
16931693
static char memcg_name[PATH_MAX];
@@ -1698,7 +1698,7 @@ void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
16981698
if (!p)
16991699
return;
17001700

1701-
spin_lock(&oom_info_lock);
1701+
mutex_lock(&oom_info_lock);
17021702
rcu_read_lock();
17031703

17041704
mem_cgrp = memcg->css.cgroup;
@@ -1767,7 +1767,7 @@ void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
17671767

17681768
pr_cont("\n");
17691769
}
1770-
spin_unlock(&oom_info_lock);
1770+
mutex_unlock(&oom_info_lock);
17711771
}
17721772

17731773
/*

‎mm/memory.c‎

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3348,6 +3348,7 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
33483348
if (ret & VM_FAULT_LOCKED)
33493349
unlock_page(vmf.page);
33503350
ret = VM_FAULT_HWPOISON;
3351+
page_cache_release(vmf.page);
33513352
goto uncharge_out;
33523353
}
33533354

@@ -3703,7 +3704,6 @@ static int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
37033704
if (unlikely(is_vm_hugetlb_page(vma)))
37043705
return hugetlb_fault(mm, vma, address, flags);
37053706

3706-
retry:
37073707
pgd = pgd_offset(mm, address);
37083708
pud = pud_alloc(mm, pgd, address);
37093709
if (!pud)
@@ -3741,20 +3741,13 @@ static int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
37413741
if (dirty && !pmd_write(orig_pmd)) {
37423742
ret = do_huge_pmd_wp_page(mm, vma, address, pmd,
37433743
orig_pmd);
3744-
/*
3745-
* If COW results in an oom, the huge pmd will
3746-
* have been split, so retry the fault on the
3747-
* pte for a smaller charge.
3748-
*/
3749-
if (unlikely(ret & VM_FAULT_OOM))
3750-
goto retry;
3751-
return ret;
3744+
if (!(ret & VM_FAULT_FALLBACK))
3745+
return ret;
37523746
} else {
37533747
huge_pmd_set_accessed(mm, vma, address, pmd,
37543748
orig_pmd, dirty);
3749+
return 0;
37553750
}
3756-
3757-
return 0;
37583751
}
37593752
}
37603753

0 commit comments

Comments
 (0)