Skip to content

Commit 59d8e5e

Browse files
committed
Merge branch 'akpm' (fixes from Andrew)
Merge misc fixes from Andrew Morton. * emailed patches from Andrew Morton <akpm@linux-foundation.org>: alpha: boot: fix build breakage introduced by system.h disintegration memcg: initialize kmem-cache destroying work earlier Randy has moved ksm: fix m68k build: only NUMA needs pfn_to_nid dmi_scan: fix missing check for _DMI_ signature in smbios_present() Revert parts of "hlist: drop the node parameter from iterators" idr: remove WARN_ON_ONCE() on negative IDs mm/mempolicy.c: fix sp_node_init() argument ordering mm/mempolicy.c: fix wrong sp_node insertion ipc: don't allocate a copy larger than max ipc: fix potential oops when src msg > 4k w/ MSG_COPY
2 parents c4c5ff0 + c3d6b62 commit 59d8e5e

13 files changed

Lines changed: 26 additions & 34 deletions

File tree

‎CREDITS‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -953,11 +953,11 @@ S: Blacksburg, Virginia 24061
953953
S: USA
954954

955955
N: Randy Dunlap
956-
E: rdunlap@xenotime.net
957-
W: http://www.xenotime.net/linux/linux.html
958-
W: http://www.linux-usb.org
956+
E: rdunlap@infradead.org
957+
W: http://www.infradead.org/~rdunlap/
959958
D: Linux-USB subsystem, USB core/UHCI/printer/storage drivers
960959
D: x86 SMP, ACPI, bootflag hacking
960+
D: documentation, builds
961961
S: (ask for current address)
962962
S: USA
963963

‎Documentation/SubmittingPatches‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ own source tree. For example:
6060
"dontdiff" is a list of files which are generated by the kernel during
6161
the build process, and should be ignored in any diff(1)-generated
6262
patch. The "dontdiff" file is included in the kernel tree in
63-
2.6.12 and later. For earlier kernel versions, you can get it
64-
from <http://www.xenotime.net/linux/doc/dontdiff>.
63+
2.6.12 and later.
6564

6665
Make sure your patch does not include any extra files which do not
6766
belong in a patch submission. Make sure to review your patch -after-

‎Documentation/printk-formats.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,5 +170,5 @@ Reminder: sizeof() result is of type size_t.
170170
Thank you for your cooperation and attention.
171171

172172

173-
By Randy Dunlap <rdunlap@xenotime.net> and
173+
By Randy Dunlap <rdunlap@infradead.org> and
174174
Andrew Murray <amurray@mpc-data.co.uk>

‎arch/alpha/boot/head.S‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* initial bootloader stuff..
55
*/
66

7+
#include <asm/pal.h>
78

89
.set noreorder
910
.globl __start

‎drivers/firmware/dmi_scan.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,6 @@ static int __init dmi_present(const char __iomem *p)
442442
static int __init smbios_present(const char __iomem *p)
443443
{
444444
u8 buf[32];
445-
int offset = 0;
446445

447446
memcpy_fromio(buf, p, 32);
448447
if ((buf[5] < 32) && dmi_checksum(buf, buf[5])) {
@@ -461,9 +460,9 @@ static int __init smbios_present(const char __iomem *p)
461460
dmi_ver = 0x0206;
462461
break;
463462
}
464-
offset = 16;
463+
return memcmp(p + 16, "_DMI_", 5) || dmi_present(p + 16);
465464
}
466-
return dmi_present(buf + offset);
465+
return 1;
467466
}
468467

469468
void __init dmi_scan_machine(void)

‎ipc/msg.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,15 +820,17 @@ long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp,
820820
struct msg_msg *copy = NULL;
821821
unsigned long copy_number = 0;
822822

823+
ns = current->nsproxy->ipc_ns;
824+
823825
if (msqid < 0 || (long) bufsz < 0)
824826
return -EINVAL;
825827
if (msgflg & MSG_COPY) {
826-
copy = prepare_copy(buf, bufsz, msgflg, &msgtyp, &copy_number);
828+
copy = prepare_copy(buf, min_t(size_t, bufsz, ns->msg_ctlmax),
829+
msgflg, &msgtyp, &copy_number);
827830
if (IS_ERR(copy))
828831
return PTR_ERR(copy);
829832
}
830833
mode = convert_mode(&msgtyp, msgflg);
831-
ns = current->nsproxy->ipc_ns;
832834

833835
msq = msg_lock_check(ns, msqid);
834836
if (IS_ERR(msq)) {

‎ipc/msgutil.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,6 @@ struct msg_msg *copy_msg(struct msg_msg *src, struct msg_msg *dst)
117117
if (alen > DATALEN_MSG)
118118
alen = DATALEN_MSG;
119119

120-
dst->next = NULL;
121-
dst->security = NULL;
122-
123120
memcpy(dst + 1, src + 1, alen);
124121

125122
len -= alen;

‎kernel/smpboot.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static int smpboot_thread_fn(void *data)
131131
continue;
132132
}
133133

134-
//BUG_ON(td->cpu != smp_processor_id());
134+
BUG_ON(td->cpu != smp_processor_id());
135135

136136
/* Check for state change setup */
137137
switch (td->status) {

‎lib/idr.c‎

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,7 @@ void idr_remove(struct idr *idp, int id)
569569
struct idr_layer *p;
570570
struct idr_layer *to_free;
571571

572-
/* see comment in idr_find_slowpath() */
573-
if (WARN_ON_ONCE(id < 0))
572+
if (id < 0)
574573
return;
575574

576575
sub_remove(idp, (idp->layers - 1) * IDR_BITS, id);
@@ -667,15 +666,7 @@ void *idr_find_slowpath(struct idr *idp, int id)
667666
int n;
668667
struct idr_layer *p;
669668

670-
/*
671-
* If @id is negative, idr_find() used to ignore the sign bit and
672-
* performed lookup with the rest of bits, which is weird and can
673-
* lead to very obscure bugs. We're now returning NULL for all
674-
* negative IDs but just in case somebody was depending on the sign
675-
* bit being ignored, let's trigger WARN_ON_ONCE() so that they can
676-
* be detected and fixed. WARN_ON_ONCE() can later be removed.
677-
*/
678-
if (WARN_ON_ONCE(id < 0))
669+
if (id < 0)
679670
return NULL;
680671

681672
p = rcu_dereference_raw(idp->top);
@@ -824,8 +815,7 @@ void *idr_replace(struct idr *idp, void *ptr, int id)
824815
int n;
825816
struct idr_layer *p, *old_p;
826817

827-
/* see comment in idr_find_slowpath() */
828-
if (WARN_ON_ONCE(id < 0))
818+
if (id < 0)
829819
return ERR_PTR(-EINVAL);
830820

831821
p = idp->top;

‎mm/ksm.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ out: page = NULL;
489489
*/
490490
static inline int get_kpfn_nid(unsigned long kpfn)
491491
{
492-
return ksm_merge_across_nodes ? 0 : pfn_to_nid(kpfn);
492+
return ksm_merge_across_nodes ? 0 : NUMA(pfn_to_nid(kpfn));
493493
}
494494

495495
static void remove_node_from_stable_tree(struct stable_node *stable_node)

0 commit comments

Comments
 (0)