Skip to contentSkip to conversation

+ include-linux-mempolicyh-add-build_bug-to-mpol_to_str-stub.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Nov 26, 2013 MM NUMA placement

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: + include-linux-mempolicyh-add-build_bug-to-mpol_to_str-stub.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Mon, 25 Nov 2013 16:25:36 -0800

The patch titled
Subject: include/linux/mempolicy.h: add BUILD_BUG to mpol_to_str() stub
has been added to the -mm tree. Its filename is
include-linux-mempolicyh-add-build_bug-to-mpol_to_str-stub.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/include-linux-mempolicyh-add-build_bug-to-mpol_to_str-stub.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/include-linux-mempolicyh-add-build_bug-to-mpol_to_str-stub.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Andrew Morton <[email protected]>
Subject: include/linux/mempolicy.h: add BUILD_BUG to mpol_to_str() stub

mpol_to_str() shouldn't be called if CONFIG_NUMA=n. If it *is* called, it's seruiously buggy - it leaves the output string unterminated.

So break the build if this situation occurs.

Cc KOSAKI Motohiro <[email protected]>
Cc David Rientjes <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Michal Hocko <[email protected]>

---

 include/linux/mempolicy.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/linux/mempolicy.h renamed from include/linux/mempolicy.h~include-linux-mempolicyh-add-build_bug-to-mpol_to_str-stub +2 -1
diff -puN include/linux/mempolicy.h~include-linux-mempolicyh-add-build_bug-to-mpol_to_str-stub include/linux/mempolicy.h
@@ -5,7 +5,7 @@
 #ifndef _LINUX_MEMPOLICY_H
 #define _LINUX_MEMPOLICY_H 1
 
-
+#include <linux/bug.h>
 #include <linux/mmzone.h>
 #include <linux/slab.h>
 #include <linux/rbtree.h>
@@ -309,6 +309,7 @@ static inline int mpol_parse_str(char *s
 
 static inline void mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol)
 {
+	BUILD_BUG();
 }
 
 static inline int mpol_misplaced(struct page *page, struct vm_area_struct *vma,

_

Patches currently in -mm which might be from [email protected] are

origin.patch
arch-alpha-kernel-systblss-remove-debug-check.patch i-need-old-gcc.patch procfs-also-fix-proc_reg_get_unmapped_area-for-mmu-case-fix.patch kernel-time-tick-commonc-document-tick_do_timer_cpu.patch input-route-kbd-leds-through-the-generic-leds-layer-fix.patch drivers-block-ccissc-cciss_init_one-use-proper-errnos.patch block-blk-mq-cpuc-use-hotcpu_notifier.patch mtd-cmdlinepart-use-cmdline-partition-parser-lib-fix-fix.patch posix_acl-uninlining.patch
mm.patch
mm-hugetlbc-simplify-pageheadhuge-and-pagehuge.patch mm-swapc-reorganize-put_compound_page.patch mm-get-rid-of-unnecessary-pageblock-scanning-in-setup_zone_migrate_reserve-fix.patch mm-memory-failure-fix-the-typo-in-me_pagecache_dirty-fix.patch include-linux-mempolicyh-add-build_bug-to-mpol_to_str-stub.patch arch-um-kernel-sysrqc-rename-print_stack_trace.patch lib-parserc-put-export_symbols-in-the-conventional-place.patch kernel-paramsc-improve-standard-definitions-checkpatch-fixes.patch kmod-run-usermodehelpers-only-on-cpus-allowed-for-kthreadd-v2-fix.patch kmod-run-usermodehelpers-only-on-cpus-allowed-for-kthreadd-v2-checkpatch-fixes.patch linux-next.patch
debugging-keep-track-of-page-owners.patch journal_add_journal_head-debug.patch kernel-forkc-export-kernel_thread-to-modules.patch mutex-subsystem-synchro-test-module.patch
slab-leaks3-default-y.patch
put_bh-debug.patch