diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 22:11:50 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 22:11:50 -0500 |
| commit | 3aacd625f20129f5a41ea3ff3b5353b0e4dabd01 (patch) | |
| tree | 7cf4ea65397f80098b30494df31cfc8f5fa26d63 /include | |
| parent | 7e21774db5cc9cf8fe93a64a2f0c6cf47db8ab24 (diff) | |
| parent | 2a1d689c9ba42a6066540fb221b6ecbd6298b728 (diff) | |
Merge branch 'akpm' (incoming from Andrew)
Merge second patch-bomb from Andrew Morton:
- various misc bits
- the rest of MM
- add generic fixmap.h, use it
- backlight updates
- dynamic_debug updates
- printk() updates
- checkpatch updates
- binfmt_elf
- ramfs
- init/
- autofs4
- drivers/rtc
- nilfs
- hfsplus
- Documentation/
- coredump
- procfs
- fork
- exec
- kexec
- kdump
- partitions
- rapidio
- rbtree
- userns
- memstick
- w1
- decompressors
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (197 commits)
lib/decompress_unlz4.c: always set an error return code on failures
romfs: fix returm err while getting inode in fill_super
drivers/w1/masters/w1-gpio.c: add strong pullup emulation
drivers/memstick/host/rtsx_pci_ms.c: fix ms card data transfer bug
userns: relax the posix_acl_valid() checks
arch/sh/kernel/dwarf.c: use rbtree postorder iteration helper instead of solution using repeated rb_erase()
fs-ext3-use-rbtree-postorder-iteration-helper-instead-of-opencoding-fix
fs/ext3: use rbtree postorder iteration helper instead of opencoding
fs/jffs2: use rbtree postorder iteration helper instead of opencoding
fs/ext4: use rbtree postorder iteration helper instead of opencoding
fs/ubifs: use rbtree postorder iteration helper instead of opencoding
net/netfilter/ipset/ip_set_hash_netiface.c: use rbtree postorder iteration instead of opencoding
rbtree/test: test rbtree_postorder_for_each_entry_safe()
rbtree/test: move rb_node to the middle of the test struct
rapidio: add modular rapidio core build into powerpc and mips branches
partitions/efi: complete documentation of gpt kernel param purpose
kdump: add /sys/kernel/vmcoreinfo ABI documentation
kdump: fix exported size of vmcoreinfo note
kexec: add sysctl to disable kexec_load
fs/exec.c: call arch_pick_mmap_layout() only once
...
Diffstat (limited to 'include')
30 files changed, 221 insertions, 139 deletions
diff --git a/include/asm-generic/fixmap.h b/include/asm-generic/fixmap.h new file mode 100644 index 000000000000..5a64ca4621f3 --- /dev/null +++ b/include/asm-generic/fixmap.h | |||
| @@ -0,0 +1,97 @@ | |||
| 1 | /* | ||
| 2 | * fixmap.h: compile-time virtual memory allocation | ||
| 3 | * | ||
| 4 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 5 | * License. See the file "COPYING" in the main directory of this archive | ||
| 6 | * for more details. | ||
| 7 | * | ||
| 8 | * Copyright (C) 1998 Ingo Molnar | ||
| 9 | * | ||
| 10 | * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999 | ||
| 11 | * x86_32 and x86_64 integration by Gustavo F. Padovan, February 2009 | ||
| 12 | * Break out common bits to asm-generic by Mark Salter, November 2013 | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef __ASM_GENERIC_FIXMAP_H | ||
| 16 | #define __ASM_GENERIC_FIXMAP_H | ||
| 17 | |||
| 18 | #include <linux/bug.h> | ||
| 19 | |||
| 20 | #define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT)) | ||
| 21 | #define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT) | ||
| 22 | |||
| 23 | #ifndef __ASSEMBLY__ | ||
| 24 | /* | ||
| 25 | * 'index to address' translation. If anyone tries to use the idx | ||
| 26 | * directly without translation, we catch the bug with a NULL-deference | ||
| 27 | * kernel oops. Illegal ranges of incoming indices are caught too. | ||
| 28 | */ | ||
| 29 | static __always_inline unsigned long fix_to_virt(const unsigned int idx) | ||
| 30 | { | ||
| 31 | BUILD_BUG_ON(idx >= __end_of_fixed_addresses); | ||
| 32 | return __fix_to_virt(idx); | ||
| 33 | } | ||
| 34 | |||
| 35 | static inline unsigned long virt_to_fix(const unsigned long vaddr) | ||
| 36 | { | ||
| 37 | BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START); | ||
| 38 | return __virt_to_fix(vaddr); | ||
| 39 | } | ||
| 40 | |||
| 41 | /* | ||
| 42 | * Provide some reasonable defaults for page flags. | ||
| 43 | * Not all architectures use all of these different types and some | ||
| 44 | * architectures use different names. | ||
| 45 | */ | ||
| 46 | #ifndef FIXMAP_PAGE_NORMAL | ||
| 47 | #define FIXMAP_PAGE_NORMAL PAGE_KERNEL | ||
| 48 | #endif | ||
| 49 | #ifndef FIXMAP_PAGE_NOCACHE | ||
| 50 | #define FIXMAP_PAGE_NOCACHE PAGE_KERNEL_NOCACHE | ||
| 51 | #endif | ||
| 52 | #ifndef FIXMAP_PAGE_IO | ||
| 53 | #define FIXMAP_PAGE_IO PAGE_KERNEL_IO | ||
| 54 | #endif | ||
| 55 | #ifndef FIXMAP_PAGE_CLEAR | ||
| 56 | #define FIXMAP_PAGE_CLEAR __pgprot(0) | ||
| 57 | #endif | ||
| 58 | |||
| 59 | #ifndef set_fixmap | ||
| 60 | #define set_fixmap(idx, phys) \ | ||
| 61 | __set_fixmap(idx, phys, FIXMAP_PAGE_NORMAL) | ||
| 62 | #endif | ||
| 63 | |||
| 64 | #ifndef clear_fixmap | ||
| 65 | #define clear_fixmap(idx) \ | ||
| 66 | __set_fixmap(idx, 0, FIXMAP_PAGE_CLEAR) | ||
| 67 | #endif | ||
| 68 | |||
| 69 | /* Return a pointer with offset calculated */ | ||
| 70 | #define __set_fixmap_offset(idx, phys, flags) \ | ||
| 71 | ({ \ | ||
| 72 | unsigned long addr; \ | ||
| 73 | __set_fixmap(idx, phys, flags); \ | ||
| 74 | addr = fix_to_virt(idx) + ((phys) & (PAGE_SIZE - 1)); \ | ||
| 75 | addr; \ | ||
| 76 | }) | ||
| 77 | |||
| 78 | #define set_fixmap_offset(idx, phys) \ | ||
| 79 | __set_fixmap_offset(idx, phys, FIXMAP_PAGE_NORMAL) | ||
| 80 | |||
| 81 | /* | ||
| 82 | * Some hardware wants to get fixmapped without caching. | ||
| 83 | */ | ||
| 84 | #define set_fixmap_nocache(idx, phys) \ | ||
| 85 | __set_fixmap(idx, phys, FIXMAP_PAGE_NOCACHE) | ||
| 86 | |||
| 87 | #define set_fixmap_offset_nocache(idx, phys) \ | ||
| 88 | __set_fixmap_offset(idx, phys, FIXMAP_PAGE_NOCACHE) | ||
| 89 | |||
| 90 | /* | ||
| 91 | * Some fixmaps are for IO | ||
| 92 | */ | ||
| 93 | #define set_fixmap_io(idx, phys) \ | ||
| 94 | __set_fixmap(idx, phys, FIXMAP_PAGE_IO) | ||
| 95 | |||
| 96 | #endif /* __ASSEMBLY__ */ | ||
| 97 | #endif /* __ASM_GENERIC_FIXMAP_H */ | ||
diff --git a/include/asm-generic/int-l64.h b/include/asm-generic/int-l64.h deleted file mode 100644 index 27d4ec0dfce0..000000000000 --- a/include/asm-generic/int-l64.h +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * asm-generic/int-l64.h | ||
| 3 | * | ||
| 4 | * Integer declarations for architectures which use "long" | ||
| 5 | * for 64-bit types. | ||
| 6 | */ | ||
| 7 | #ifndef _ASM_GENERIC_INT_L64_H | ||
| 8 | #define _ASM_GENERIC_INT_L64_H | ||
| 9 | |||
| 10 | #include <uapi/asm-generic/int-l64.h> | ||
| 11 | |||
| 12 | |||
| 13 | #ifndef __ASSEMBLY__ | ||
| 14 | |||
| 15 | typedef signed char s8; | ||
| 16 | typedef unsigned char u8; | ||
| 17 | |||
| 18 | typedef signed short s16; | ||
| 19 | typedef unsigned short u16; | ||
| 20 | |||
| 21 | typedef signed int s32; | ||
| 22 | typedef unsigned int u32; | ||
| 23 | |||
| 24 | typedef signed long s64; | ||
| 25 | typedef unsigned long u64; | ||
| 26 | |||
| 27 | #define S8_C(x) x | ||
| 28 | #define U8_C(x) x ## U | ||
| 29 | #define S16_C(x) x | ||
| 30 | #define U16_C(x) x ## U | ||
| 31 | #define S32_C(x) x | ||
| 32 | #define U32_C(x) x ## U | ||
| 33 | #define S64_C(x) x ## L | ||
| 34 | #define U64_C(x) x ## UL | ||
| 35 | |||
| 36 | #else /* __ASSEMBLY__ */ | ||
| 37 | |||
| 38 | #define S8_C(x) x | ||
| 39 | #define U8_C(x) x | ||
| 40 | #define S16_C(x) x | ||
| 41 | #define U16_C(x) x | ||
| 42 | #define S32_C(x) x | ||
| 43 | #define U32_C(x) x | ||
| 44 | #define S64_C(x) x | ||
| 45 | #define U64_C(x) x | ||
| 46 | |||
| 47 | #endif /* __ASSEMBLY__ */ | ||
| 48 | |||
| 49 | #endif /* _ASM_GENERIC_INT_L64_H */ | ||
diff --git a/include/linux/cache.h b/include/linux/cache.h index 4c570653ab84..17e7e82d2aa7 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | #ifndef __LINUX_CACHE_H | 1 | #ifndef __LINUX_CACHE_H |
| 2 | #define __LINUX_CACHE_H | 2 | #define __LINUX_CACHE_H |
| 3 | 3 | ||
| 4 | #include <linux/kernel.h> | 4 | #include <uapi/linux/kernel.h> |
| 5 | #include <asm/cache.h> | 5 | #include <asm/cache.h> |
| 6 | 6 | ||
| 7 | #ifndef L1_CACHE_ALIGN | 7 | #ifndef L1_CACHE_ALIGN |
| 8 | #define L1_CACHE_ALIGN(x) ALIGN(x, L1_CACHE_BYTES) | 8 | #define L1_CACHE_ALIGN(x) __ALIGN_KERNEL(x, L1_CACHE_BYTES) |
| 9 | #endif | 9 | #endif |
| 10 | 10 | ||
| 11 | #ifndef SMP_CACHE_BYTES | 11 | #ifndef SMP_CACHE_BYTES |
diff --git a/include/linux/ceph/decode.h b/include/linux/ceph/decode.h index 0442c3d800f0..a6ef9cc267ec 100644 --- a/include/linux/ceph/decode.h +++ b/include/linux/ceph/decode.h | |||
| @@ -8,23 +8,6 @@ | |||
| 8 | 8 | ||
| 9 | #include <linux/ceph/types.h> | 9 | #include <linux/ceph/types.h> |
| 10 | 10 | ||
| 11 | /* This seemed to be the easiest place to define these */ | ||
| 12 | |||
| 13 | #define U8_MAX ((u8)(~0U)) | ||
| 14 | #define U16_MAX ((u16)(~0U)) | ||
| 15 | #define U32_MAX ((u32)(~0U)) | ||
| 16 | #define U64_MAX ((u64)(~0ULL)) | ||
| 17 | |||
| 18 | #define S8_MAX ((s8)(U8_MAX >> 1)) | ||
| 19 | #define S16_MAX ((s16)(U16_MAX >> 1)) | ||
| 20 | #define S32_MAX ((s32)(U32_MAX >> 1)) | ||
| 21 | #define S64_MAX ((s64)(U64_MAX >> 1LL)) | ||
| 22 | |||
| 23 | #define S8_MIN ((s8)(-S8_MAX - 1)) | ||
| 24 | #define S16_MIN ((s16)(-S16_MAX - 1)) | ||
| 25 | #define S32_MIN ((s32)(-S32_MAX - 1)) | ||
| 26 | #define S64_MIN ((s64)(-S64_MAX - 1LL)) | ||
| 27 | |||
| 28 | /* | 11 | /* |
| 29 | * in all cases, | 12 | * in all cases, |
| 30 | * void **p pointer to position pointer | 13 | * void **p pointer to position pointer |
diff --git a/include/linux/genalloc.h b/include/linux/genalloc.h index 1eda33d7cb10..1c2fdaa2ffc3 100644 --- a/include/linux/genalloc.h +++ b/include/linux/genalloc.h | |||
| @@ -30,6 +30,8 @@ | |||
| 30 | #ifndef __GENALLOC_H__ | 30 | #ifndef __GENALLOC_H__ |
| 31 | #define __GENALLOC_H__ | 31 | #define __GENALLOC_H__ |
| 32 | 32 | ||
| 33 | #include <linux/spinlock_types.h> | ||
| 34 | |||
| 33 | struct device; | 35 | struct device; |
| 34 | struct device_node; | 36 | struct device_node; |
| 35 | 37 | ||
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 9b4dd491f7e8..0437439bc047 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef __LINUX_GFP_H | 1 | #ifndef __LINUX_GFP_H |
| 2 | #define __LINUX_GFP_H | 2 | #define __LINUX_GFP_H |
| 3 | 3 | ||
| 4 | #include <linux/mmdebug.h> | ||
| 4 | #include <linux/mmzone.h> | 5 | #include <linux/mmzone.h> |
| 5 | #include <linux/stddef.h> | 6 | #include <linux/stddef.h> |
| 6 | #include <linux/linkage.h> | 7 | #include <linux/linkage.h> |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index d01cc972a1d9..8c43cc469d78 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _LINUX_HUGETLB_H | 2 | #define _LINUX_HUGETLB_H |
| 3 | 3 | ||
| 4 | #include <linux/mm_types.h> | 4 | #include <linux/mm_types.h> |
| 5 | #include <linux/mmdebug.h> | ||
| 5 | #include <linux/fs.h> | 6 | #include <linux/fs.h> |
| 6 | #include <linux/hugetlb_inline.h> | 7 | #include <linux/hugetlb_inline.h> |
| 7 | #include <linux/cgroup.h> | 8 | #include <linux/cgroup.h> |
| @@ -354,7 +355,7 @@ static inline pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma, | |||
| 354 | 355 | ||
| 355 | static inline struct hstate *page_hstate(struct page *page) | 356 | static inline struct hstate *page_hstate(struct page *page) |
| 356 | { | 357 | { |
| 357 | VM_BUG_ON(!PageHuge(page)); | 358 | VM_BUG_ON_PAGE(!PageHuge(page), page); |
| 358 | return size_to_hstate(PAGE_SIZE << compound_order(page)); | 359 | return size_to_hstate(PAGE_SIZE << compound_order(page)); |
| 359 | } | 360 | } |
| 360 | 361 | ||
diff --git a/include/linux/hugetlb_cgroup.h b/include/linux/hugetlb_cgroup.h index ce8217f7b5c2..787bba3bf552 100644 --- a/include/linux/hugetlb_cgroup.h +++ b/include/linux/hugetlb_cgroup.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #ifndef _LINUX_HUGETLB_CGROUP_H | 15 | #ifndef _LINUX_HUGETLB_CGROUP_H |
| 16 | #define _LINUX_HUGETLB_CGROUP_H | 16 | #define _LINUX_HUGETLB_CGROUP_H |
| 17 | 17 | ||
| 18 | #include <linux/mmdebug.h> | ||
| 18 | #include <linux/res_counter.h> | 19 | #include <linux/res_counter.h> |
| 19 | 20 | ||
| 20 | struct hugetlb_cgroup; | 21 | struct hugetlb_cgroup; |
| @@ -28,7 +29,7 @@ struct hugetlb_cgroup; | |||
| 28 | 29 | ||
| 29 | static inline struct hugetlb_cgroup *hugetlb_cgroup_from_page(struct page *page) | 30 | static inline struct hugetlb_cgroup *hugetlb_cgroup_from_page(struct page *page) |
| 30 | { | 31 | { |
| 31 | VM_BUG_ON(!PageHuge(page)); | 32 | VM_BUG_ON_PAGE(!PageHuge(page), page); |
| 32 | 33 | ||
| 33 | if (compound_order(page) < HUGETLB_CGROUP_MIN_ORDER) | 34 | if (compound_order(page) < HUGETLB_CGROUP_MIN_ORDER) |
| 34 | return NULL; | 35 | return NULL; |
| @@ -38,7 +39,7 @@ static inline struct hugetlb_cgroup *hugetlb_cgroup_from_page(struct page *page) | |||
| 38 | static inline | 39 | static inline |
| 39 | int set_hugetlb_cgroup(struct page *page, struct hugetlb_cgroup *h_cg) | 40 | int set_hugetlb_cgroup(struct page *page, struct hugetlb_cgroup *h_cg) |
| 40 | { | 41 | { |
| 41 | VM_BUG_ON(!PageHuge(page)); | 42 | VM_BUG_ON_PAGE(!PageHuge(page), page); |
| 42 | 43 | ||
| 43 | if (compound_order(page) < HUGETLB_CGROUP_MIN_ORDER) | 44 | if (compound_order(page) < HUGETLB_CGROUP_MIN_ORDER) |
| 44 | return -1; | 45 | return -1; |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 2aa3d4b000e6..f74bb581ab64 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -29,6 +29,19 @@ | |||
| 29 | #define ULLONG_MAX (~0ULL) | 29 | #define ULLONG_MAX (~0ULL) |
| 30 | #define SIZE_MAX (~(size_t)0) | 30 | #define SIZE_MAX (~(size_t)0) |
| 31 | 31 | ||
| 32 | #define U8_MAX ((u8)~0U) | ||
| 33 | #define S8_MAX ((s8)(U8_MAX>>1)) | ||
| 34 | #define S8_MIN ((s8)(-S8_MAX - 1)) | ||
| 35 | #define U16_MAX ((u16)~0U) | ||
| 36 | #define S16_MAX ((s16)(U16_MAX>>1)) | ||
| 37 | #define S16_MIN ((s16)(-S16_MAX - 1)) | ||
| 38 | #define U32_MAX ((u32)~0U) | ||
| 39 | #define S32_MAX ((s32)(U32_MAX>>1)) | ||
| 40 | #define S32_MIN ((s32)(-S32_MAX - 1)) | ||
| 41 | #define U64_MAX ((u64)~0ULL) | ||
| 42 | #define S64_MAX ((s64)(U64_MAX>>1)) | ||
| 43 | #define S64_MIN ((s64)(-S64_MAX - 1)) | ||
| 44 | |||
| 32 | #define STACK_MAGIC 0xdeadbeef | 45 | #define STACK_MAGIC 0xdeadbeef |
| 33 | 46 | ||
| 34 | #define REPEAT_BYTE(x) ((~0ul / 0xff) * (x)) | 47 | #define REPEAT_BYTE(x) ((~0ul / 0xff) * (x)) |
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 5fd33dc1fe3a..6d4066cdb5b5 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
| @@ -170,6 +170,7 @@ unsigned long paddr_vmcoreinfo_note(void); | |||
| 170 | 170 | ||
| 171 | extern struct kimage *kexec_image; | 171 | extern struct kimage *kexec_image; |
| 172 | extern struct kimage *kexec_crash_image; | 172 | extern struct kimage *kexec_crash_image; |
| 173 | extern int kexec_load_disabled; | ||
| 173 | 174 | ||
| 174 | #ifndef kexec_flush_icache_page | 175 | #ifndef kexec_flush_icache_page |
| 175 | #define kexec_flush_icache_page(page) | 176 | #define kexec_flush_icache_page(page) |
diff --git a/include/linux/memblock.h b/include/linux/memblock.h index cd0274bebd4c..1ef66360f0b0 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h | |||
| @@ -61,6 +61,7 @@ phys_addr_t memblock_find_in_range_node(phys_addr_t size, phys_addr_t align, | |||
| 61 | phys_addr_t memblock_find_in_range(phys_addr_t start, phys_addr_t end, | 61 | phys_addr_t memblock_find_in_range(phys_addr_t start, phys_addr_t end, |
| 62 | phys_addr_t size, phys_addr_t align); | 62 | phys_addr_t size, phys_addr_t align); |
| 63 | phys_addr_t get_allocated_memblock_reserved_regions_info(phys_addr_t *addr); | 63 | phys_addr_t get_allocated_memblock_reserved_regions_info(phys_addr_t *addr); |
| 64 | phys_addr_t get_allocated_memblock_memory_regions_info(phys_addr_t *addr); | ||
| 64 | void memblock_allow_resize(void); | 65 | void memblock_allow_resize(void); |
| 65 | int memblock_add_node(phys_addr_t base, phys_addr_t size, int nid); | 66 | int memblock_add_node(phys_addr_t base, phys_addr_t size, int nid); |
| 66 | int memblock_add(phys_addr_t base, phys_addr_t size); | 67 | int memblock_add(phys_addr_t base, phys_addr_t size); |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index b3e7a667e03c..abd0113b6620 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
| @@ -497,10 +497,11 @@ void __memcg_kmem_commit_charge(struct page *page, | |||
| 497 | void __memcg_kmem_uncharge_pages(struct page *page, int order); | 497 | void __memcg_kmem_uncharge_pages(struct page *page, int order); |
| 498 | 498 | ||
| 499 | int memcg_cache_id(struct mem_cgroup *memcg); | 499 | int memcg_cache_id(struct mem_cgroup *memcg); |
| 500 | int memcg_register_cache(struct mem_cgroup *memcg, struct kmem_cache *s, | 500 | int memcg_alloc_cache_params(struct mem_cgroup *memcg, struct kmem_cache *s, |
| 501 | struct kmem_cache *root_cache); | 501 | struct kmem_cache *root_cache); |
| 502 | void memcg_release_cache(struct kmem_cache *cachep); | 502 | void memcg_free_cache_params(struct kmem_cache *s); |
| 503 | void memcg_cache_list_add(struct mem_cgroup *memcg, struct kmem_cache *cachep); | 503 | void memcg_register_cache(struct kmem_cache *s); |
| 504 | void memcg_unregister_cache(struct kmem_cache *s); | ||
| 504 | 505 | ||
| 505 | int memcg_update_cache_size(struct kmem_cache *s, int num_groups); | 506 | int memcg_update_cache_size(struct kmem_cache *s, int num_groups); |
| 506 | void memcg_update_array_size(int num_groups); | 507 | void memcg_update_array_size(int num_groups); |
| @@ -640,19 +641,21 @@ static inline int memcg_cache_id(struct mem_cgroup *memcg) | |||
| 640 | return -1; | 641 | return -1; |
| 641 | } | 642 | } |
| 642 | 643 | ||
| 643 | static inline int | 644 | static inline int memcg_alloc_cache_params(struct mem_cgroup *memcg, |
| 644 | memcg_register_cache(struct mem_cgroup *memcg, struct kmem_cache *s, | 645 | struct kmem_cache *s, struct kmem_cache *root_cache) |
| 645 | struct kmem_cache *root_cache) | ||
| 646 | { | 646 | { |
| 647 | return 0; | 647 | return 0; |
| 648 | } | 648 | } |
| 649 | 649 | ||
| 650 | static inline void memcg_release_cache(struct kmem_cache *cachep) | 650 | static inline void memcg_free_cache_params(struct kmem_cache *s) |
| 651 | { | ||
| 652 | } | ||
| 653 | |||
| 654 | static inline void memcg_register_cache(struct kmem_cache *s) | ||
| 651 | { | 655 | { |
| 652 | } | 656 | } |
| 653 | 657 | ||
| 654 | static inline void memcg_cache_list_add(struct mem_cgroup *memcg, | 658 | static inline void memcg_unregister_cache(struct kmem_cache *s) |
| 655 | struct kmem_cache *s) | ||
| 656 | { | 659 | { |
| 657 | } | 660 | } |
| 658 | 661 | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index a512dd836931..d9992fc128ca 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
| 7 | 7 | ||
| 8 | #include <linux/mmdebug.h> | ||
| 8 | #include <linux/gfp.h> | 9 | #include <linux/gfp.h> |
| 9 | #include <linux/bug.h> | 10 | #include <linux/bug.h> |
| 10 | #include <linux/list.h> | 11 | #include <linux/list.h> |
| @@ -303,7 +304,7 @@ static inline int get_freepage_migratetype(struct page *page) | |||
| 303 | */ | 304 | */ |
| 304 | static inline int put_page_testzero(struct page *page) | 305 | static inline int put_page_testzero(struct page *page) |
| 305 | { | 306 | { |
| 306 | VM_BUG_ON(atomic_read(&page->_count) == 0); | 307 | VM_BUG_ON_PAGE(atomic_read(&page->_count) == 0, page); |
| 307 | return atomic_dec_and_test(&page->_count); | 308 | return atomic_dec_and_test(&page->_count); |
| 308 | } | 309 | } |
| 309 | 310 | ||
| @@ -364,7 +365,7 @@ static inline int is_vmalloc_or_module_addr(const void *x) | |||
| 364 | static inline void compound_lock(struct page *page) | 365 | static inline void compound_lock(struct page *page) |
| 365 | { | 366 | { |
| 366 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 367 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
| 367 | VM_BUG_ON(PageSlab(page)); | 368 | VM_BUG_ON_PAGE(PageSlab(page), page); |
| 368 | bit_spin_lock(PG_compound_lock, &page->flags); | 369 | bit_spin_lock(PG_compound_lock, &page->flags); |
| 369 | #endif | 370 | #endif |
| 370 | } | 371 | } |
| @@ -372,7 +373,7 @@ static inline void compound_lock(struct page *page) | |||
| 372 | static inline void compound_unlock(struct page *page) | 373 | static inline void compound_unlock(struct page *page) |
| 373 | { | 374 | { |
| 374 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 375 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
| 375 | VM_BUG_ON(PageSlab(page)); | 376 | VM_BUG_ON_PAGE(PageSlab(page), page); |
| 376 | bit_spin_unlock(PG_compound_lock, &page->flags); | 377 | bit_spin_unlock(PG_compound_lock, &page->flags); |
| 377 | #endif | 378 | #endif |
| 378 | } | 379 | } |
| @@ -447,7 +448,7 @@ static inline bool __compound_tail_refcounted(struct page *page) | |||
| 447 | */ | 448 | */ |
| 448 | static inline bool compound_tail_refcounted(struct page *page) | 449 | static inline bool compound_tail_refcounted(struct page *page) |
| 449 | { | 450 | { |
| 450 | VM_BUG_ON(!PageHead(page)); | 451 | VM_BUG_ON_PAGE(!PageHead(page), page); |
| 451 | return __compound_tail_refcounted(page); | 452 | return __compound_tail_refcounted(page); |
| 452 | } | 453 | } |
| 453 | 454 | ||
| @@ -456,9 +457,9 @@ static inline void get_huge_page_tail(struct page *page) | |||
| 456 | /* | 457 | /* |
| 457 | * __split_huge_page_refcount() cannot run from under us. | 458 | * __split_huge_page_refcount() cannot run from under us. |
| 458 | */ | 459 | */ |
| 459 | VM_BUG_ON(!PageTail(page)); | 460 | VM_BUG_ON_PAGE(!PageTail(page), page); |
| 460 | VM_BUG_ON(page_mapcount(page) < 0); | 461 | VM_BUG_ON_PAGE(page_mapcount(page) < 0, page); |
| 461 | VM_BUG_ON(atomic_read(&page->_count) != 0); | 462 | VM_BUG_ON_PAGE(atomic_read(&page->_count) != 0, page); |
| 462 | if (compound_tail_refcounted(page->first_page)) | 463 | if (compound_tail_refcounted(page->first_page)) |
| 463 | atomic_inc(&page->_mapcount); | 464 | atomic_inc(&page->_mapcount); |
| 464 | } | 465 | } |
| @@ -474,7 +475,7 @@ static inline void get_page(struct page *page) | |||
| 474 | * Getting a normal page or the head of a compound page | 475 | * Getting a normal page or the head of a compound page |
| 475 | * requires to already have an elevated page->_count. | 476 | * requires to already have an elevated page->_count. |
| 476 | */ | 477 | */ |
| 477 | VM_BUG_ON(atomic_read(&page->_count) <= 0); | 478 | VM_BUG_ON_PAGE(atomic_read(&page->_count) <= 0, page); |
| 478 | atomic_inc(&page->_count); | 479 | atomic_inc(&page->_count); |
| 479 | } | 480 | } |
| 480 | 481 | ||
| @@ -511,13 +512,13 @@ static inline int PageBuddy(struct page *page) | |||
| 511 | 512 | ||
| 512 | static inline void __SetPageBuddy(struct page *page) | 513 | static inline void __SetPageBuddy(struct page *page) |
| 513 | { | 514 | { |
| 514 | VM_BUG_ON(atomic_read(&page->_mapcount) != -1); | 515 | VM_BUG_ON_PAGE(atomic_read(&page->_mapcount) != -1, page); |
| 515 | atomic_set(&page->_mapcount, PAGE_BUDDY_MAPCOUNT_VALUE); | 516 | atomic_set(&page->_mapcount, PAGE_BUDDY_MAPCOUNT_VALUE); |
| 516 | } | 517 | } |
| 517 | 518 | ||
| 518 | static inline void __ClearPageBuddy(struct page *page) | 519 | static inline void __ClearPageBuddy(struct page *page) |
| 519 | { | 520 | { |
| 520 | VM_BUG_ON(!PageBuddy(page)); | 521 | VM_BUG_ON_PAGE(!PageBuddy(page), page); |
| 521 | atomic_set(&page->_mapcount, -1); | 522 | atomic_set(&page->_mapcount, -1); |
| 522 | } | 523 | } |
| 523 | 524 | ||
| @@ -1401,7 +1402,7 @@ static inline bool ptlock_init(struct page *page) | |||
| 1401 | * slab code uses page->slab_cache and page->first_page (for tail | 1402 | * slab code uses page->slab_cache and page->first_page (for tail |
| 1402 | * pages), which share storage with page->ptl. | 1403 | * pages), which share storage with page->ptl. |
| 1403 | */ | 1404 | */ |
| 1404 | VM_BUG_ON(*(unsigned long *)&page->ptl); | 1405 | VM_BUG_ON_PAGE(*(unsigned long *)&page->ptl, page); |
| 1405 | if (!ptlock_alloc(page)) | 1406 | if (!ptlock_alloc(page)) |
| 1406 | return false; | 1407 | return false; |
| 1407 | spin_lock_init(ptlock_ptr(page)); | 1408 | spin_lock_init(ptlock_ptr(page)); |
| @@ -1492,7 +1493,7 @@ static inline bool pgtable_pmd_page_ctor(struct page *page) | |||
| 1492 | static inline void pgtable_pmd_page_dtor(struct page *page) | 1493 | static inline void pgtable_pmd_page_dtor(struct page *page) |
| 1493 | { | 1494 | { |
| 1494 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 1495 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
| 1495 | VM_BUG_ON(page->pmd_huge_pte); | 1496 | VM_BUG_ON_PAGE(page->pmd_huge_pte, page); |
| 1496 | #endif | 1497 | #endif |
| 1497 | ptlock_free(page); | 1498 | ptlock_free(page); |
| 1498 | } | 1499 | } |
| @@ -2029,8 +2030,6 @@ extern void shake_page(struct page *p, int access); | |||
| 2029 | extern atomic_long_t num_poisoned_pages; | 2030 | extern atomic_long_t num_poisoned_pages; |
| 2030 | extern int soft_offline_page(struct page *page, int flags); | 2031 | extern int soft_offline_page(struct page *page, int flags); |
| 2031 | 2032 | ||
| 2032 | extern void dump_page(struct page *page); | ||
| 2033 | |||
| 2034 | #if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_HUGETLBFS) | 2033 | #if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_HUGETLBFS) |
| 2035 | extern void clear_huge_page(struct page *page, | 2034 | extern void clear_huge_page(struct page *page, |
| 2036 | unsigned long addr, | 2035 | unsigned long addr, |
diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h index 580bd587d916..5042c036dda9 100644 --- a/include/linux/mmdebug.h +++ b/include/linux/mmdebug.h | |||
| @@ -1,10 +1,19 @@ | |||
| 1 | #ifndef LINUX_MM_DEBUG_H | 1 | #ifndef LINUX_MM_DEBUG_H |
| 2 | #define LINUX_MM_DEBUG_H 1 | 2 | #define LINUX_MM_DEBUG_H 1 |
| 3 | 3 | ||
| 4 | struct page; | ||
| 5 | |||
| 6 | extern void dump_page(struct page *page, char *reason); | ||
| 7 | extern void dump_page_badflags(struct page *page, char *reason, | ||
| 8 | unsigned long badflags); | ||
| 9 | |||
| 4 | #ifdef CONFIG_DEBUG_VM | 10 | #ifdef CONFIG_DEBUG_VM |
| 5 | #define VM_BUG_ON(cond) BUG_ON(cond) | 11 | #define VM_BUG_ON(cond) BUG_ON(cond) |
| 12 | #define VM_BUG_ON_PAGE(cond, page) \ | ||
| 13 | do { if (unlikely(cond)) { dump_page(page, NULL); BUG(); } } while (0) | ||
| 6 | #else | 14 | #else |
| 7 | #define VM_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond) | 15 | #define VM_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond) |
| 16 | #define VM_BUG_ON_PAGE(cond, page) VM_BUG_ON(cond) | ||
| 8 | #endif | 17 | #endif |
| 9 | 18 | ||
| 10 | #ifdef CONFIG_DEBUG_VIRTUAL | 19 | #ifdef CONFIG_DEBUG_VIRTUAL |
diff --git a/include/linux/of.h b/include/linux/of.h index 276c546980d8..70c64ba17fa5 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
| @@ -377,8 +377,13 @@ static inline bool of_have_populated_dt(void) | |||
| 377 | return false; | 377 | return false; |
| 378 | } | 378 | } |
| 379 | 379 | ||
| 380 | /* Kill an unused variable warning on a device_node pointer */ | ||
| 381 | static inline void __of_use_dn(const struct device_node *np) | ||
| 382 | { | ||
| 383 | } | ||
| 384 | |||
| 380 | #define for_each_child_of_node(parent, child) \ | 385 | #define for_each_child_of_node(parent, child) \ |
| 381 | while (0) | 386 | while (__of_use_dn(parent), __of_use_dn(child), 0) |
| 382 | 387 | ||
| 383 | #define for_each_available_child_of_node(parent, child) \ | 388 | #define for_each_available_child_of_node(parent, child) \ |
| 384 | while (0) | 389 | while (0) |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 98ada58f9942..e464b4e987e8 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
| @@ -412,7 +412,7 @@ static inline void ClearPageCompound(struct page *page) | |||
| 412 | */ | 412 | */ |
| 413 | static inline int PageTransHuge(struct page *page) | 413 | static inline int PageTransHuge(struct page *page) |
| 414 | { | 414 | { |
| 415 | VM_BUG_ON(PageTail(page)); | 415 | VM_BUG_ON_PAGE(PageTail(page), page); |
| 416 | return PageHead(page); | 416 | return PageHead(page); |
| 417 | } | 417 | } |
| 418 | 418 | ||
| @@ -460,25 +460,25 @@ static inline int PageTransTail(struct page *page) | |||
| 460 | */ | 460 | */ |
| 461 | static inline int PageSlabPfmemalloc(struct page *page) | 461 | static inline int PageSlabPfmemalloc(struct page *page) |
| 462 | { | 462 | { |
| 463 | VM_BUG_ON(!PageSlab(page)); | 463 | VM_BUG_ON_PAGE(!PageSlab(page), page); |
| 464 | return PageActive(page); | 464 | return PageActive(page); |
| 465 | } | 465 | } |
| 466 | 466 | ||
| 467 | static inline void SetPageSlabPfmemalloc(struct page *page) | 467 | static inline void SetPageSlabPfmemalloc(struct page *page) |
| 468 | { | 468 | { |
| 469 | VM_BUG_ON(!PageSlab(page)); | 469 | VM_BUG_ON_PAGE(!PageSlab(page), page); |
| 470 | SetPageActive(page); | 470 | SetPageActive(page); |
| 471 | } | 471 | } |
| 472 | 472 | ||
| 473 | static inline void __ClearPageSlabPfmemalloc(struct page *page) | 473 | static inline void __ClearPageSlabPfmemalloc(struct page *page) |
| 474 | { | 474 | { |
| 475 | VM_BUG_ON(!PageSlab(page)); | 475 | VM_BUG_ON_PAGE(!PageSlab(page), page); |
| 476 | __ClearPageActive(page); | 476 | __ClearPageActive(page); |
| 477 | } | 477 | } |
| 478 | 478 | ||
| 479 | static inline void ClearPageSlabPfmemalloc(struct page *page) | 479 | static inline void ClearPageSlabPfmemalloc(struct page *page) |
| 480 | { | 480 | { |
| 481 | VM_BUG_ON(!PageSlab(page)); | 481 | VM_BUG_ON_PAGE(!PageSlab(page), page); |
| 482 | ClearPageActive(page); | 482 | ClearPageActive(page); |
| 483 | } | 483 | } |
| 484 | 484 | ||
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index e3dea75a078b..1710d1b060ba 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
| @@ -162,7 +162,7 @@ static inline int page_cache_get_speculative(struct page *page) | |||
| 162 | * disabling preempt, and hence no need for the "speculative get" that | 162 | * disabling preempt, and hence no need for the "speculative get" that |
| 163 | * SMP requires. | 163 | * SMP requires. |
| 164 | */ | 164 | */ |
| 165 | VM_BUG_ON(page_count(page) == 0); | 165 | VM_BUG_ON_PAGE(page_count(page) == 0, page); |
| 166 | atomic_inc(&page->_count); | 166 | atomic_inc(&page->_count); |
| 167 | 167 | ||
| 168 | #else | 168 | #else |
| @@ -175,7 +175,7 @@ static inline int page_cache_get_speculative(struct page *page) | |||
| 175 | return 0; | 175 | return 0; |
| 176 | } | 176 | } |
| 177 | #endif | 177 | #endif |
| 178 | VM_BUG_ON(PageTail(page)); | 178 | VM_BUG_ON_PAGE(PageTail(page), page); |
| 179 | 179 | ||
| 180 | return 1; | 180 | return 1; |
| 181 | } | 181 | } |
| @@ -191,14 +191,14 @@ static inline int page_cache_add_speculative(struct page *page, int count) | |||
| 191 | # ifdef CONFIG_PREEMPT_COUNT | 191 | # ifdef CONFIG_PREEMPT_COUNT |
| 192 | VM_BUG_ON(!in_atomic()); | 192 | VM_BUG_ON(!in_atomic()); |
| 193 | # endif | 193 | # endif |
| 194 | VM_BUG_ON(page_count(page) == 0); | 194 | VM_BUG_ON_PAGE(page_count(page) == 0, page); |
| 195 | atomic_add(count, &page->_count); | 195 | atomic_add(count, &page->_count); |
| 196 | 196 | ||
| 197 | #else | 197 | #else |
| 198 | if (unlikely(!atomic_add_unless(&page->_count, count, 0))) | 198 | if (unlikely(!atomic_add_unless(&page->_count, count, 0))) |
| 199 | return 0; | 199 | return 0; |
| 200 | #endif | 200 | #endif |
| 201 | VM_BUG_ON(PageCompound(page) && page != compound_head(page)); | 201 | VM_BUG_ON_PAGE(PageCompound(page) && page != compound_head(page), page); |
| 202 | 202 | ||
| 203 | return 1; | 203 | return 1; |
| 204 | } | 204 | } |
| @@ -210,7 +210,7 @@ static inline int page_freeze_refs(struct page *page, int count) | |||
| 210 | 210 | ||
| 211 | static inline void page_unfreeze_refs(struct page *page, int count) | 211 | static inline void page_unfreeze_refs(struct page *page, int count) |
| 212 | { | 212 | { |
| 213 | VM_BUG_ON(page_count(page) != 0); | 213 | VM_BUG_ON_PAGE(page_count(page) != 0, page); |
| 214 | VM_BUG_ON(count == 0); | 214 | VM_BUG_ON(count == 0); |
| 215 | 215 | ||
| 216 | atomic_set(&page->_count, count); | 216 | atomic_set(&page->_count, count); |
diff --git a/include/linux/parser.h b/include/linux/parser.h index ea2281e726f6..39d5b7955b23 100644 --- a/include/linux/parser.h +++ b/include/linux/parser.h | |||
| @@ -29,5 +29,6 @@ int match_token(char *, const match_table_t table, substring_t args[]); | |||
| 29 | int match_int(substring_t *, int *result); | 29 | int match_int(substring_t *, int *result); |
| 30 | int match_octal(substring_t *, int *result); | 30 | int match_octal(substring_t *, int *result); |
| 31 | int match_hex(substring_t *, int *result); | 31 | int match_hex(substring_t *, int *result); |
| 32 | bool match_wildcard(const char *pattern, const char *str); | ||
| 32 | size_t match_strlcpy(char *, const substring_t *, size_t); | 33 | size_t match_strlcpy(char *, const substring_t *, size_t); |
| 33 | char *match_strdup(const substring_t *); | 34 | char *match_strdup(const substring_t *); |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 9e4761caa80c..e3817d2441b6 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef __LINUX_PERCPU_H | 1 | #ifndef __LINUX_PERCPU_H |
| 2 | #define __LINUX_PERCPU_H | 2 | #define __LINUX_PERCPU_H |
| 3 | 3 | ||
| 4 | #include <linux/mmdebug.h> | ||
| 4 | #include <linux/preempt.h> | 5 | #include <linux/preempt.h> |
| 5 | #include <linux/smp.h> | 6 | #include <linux/smp.h> |
| 6 | #include <linux/cpumask.h> | 7 | #include <linux/cpumask.h> |
diff --git a/include/linux/printk.h b/include/linux/printk.h index 694925837a16..cc6f74d65167 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #include <linux/init.h> | 5 | #include <linux/init.h> |
| 6 | #include <linux/kern_levels.h> | 6 | #include <linux/kern_levels.h> |
| 7 | #include <linux/linkage.h> | 7 | #include <linux/linkage.h> |
| 8 | #include <linux/cache.h> | ||
| 8 | 9 | ||
| 9 | extern const char linux_banner[]; | 10 | extern const char linux_banner[]; |
| 10 | extern const char linux_proc_banner[]; | 11 | extern const char linux_proc_banner[]; |
| @@ -253,17 +254,17 @@ extern asmlinkage void dump_stack(void) __cold; | |||
| 253 | */ | 254 | */ |
| 254 | 255 | ||
| 255 | #ifdef CONFIG_PRINTK | 256 | #ifdef CONFIG_PRINTK |
| 256 | #define printk_once(fmt, ...) \ | 257 | #define printk_once(fmt, ...) \ |
| 257 | ({ \ | 258 | ({ \ |
| 258 | static bool __print_once; \ | 259 | static bool __print_once __read_mostly; \ |
| 259 | \ | 260 | \ |
| 260 | if (!__print_once) { \ | 261 | if (!__print_once) { \ |
| 261 | __print_once = true; \ | 262 | __print_once = true; \ |
| 262 | printk(fmt, ##__VA_ARGS__); \ | 263 | printk(fmt, ##__VA_ARGS__); \ |
| 263 | } \ | 264 | } \ |
| 264 | }) | 265 | }) |
| 265 | #else | 266 | #else |
| 266 | #define printk_once(fmt, ...) \ | 267 | #define printk_once(fmt, ...) \ |
| 267 | no_printk(fmt, ##__VA_ARGS__) | 268 | no_printk(fmt, ##__VA_ARGS__) |
| 268 | #endif | 269 | #endif |
| 269 | 270 | ||
diff --git a/include/linux/ramfs.h b/include/linux/ramfs.h index 753207c8ce20..ecc730977a5a 100644 --- a/include/linux/ramfs.h +++ b/include/linux/ramfs.h | |||
| @@ -14,13 +14,6 @@ ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize) | |||
| 14 | } | 14 | } |
| 15 | #else | 15 | #else |
| 16 | extern int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize); | 16 | extern int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize); |
| 17 | extern unsigned long ramfs_nommu_get_unmapped_area(struct file *file, | ||
| 18 | unsigned long addr, | ||
| 19 | unsigned long len, | ||
| 20 | unsigned long pgoff, | ||
| 21 | unsigned long flags); | ||
| 22 | |||
| 23 | extern int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma); | ||
| 24 | #endif | 17 | #endif |
| 25 | 18 | ||
| 26 | extern const struct file_operations ramfs_file_operations; | 19 | extern const struct file_operations ramfs_file_operations; |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 485234d2fd42..68a0e84463a0 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -229,7 +229,7 @@ extern char ___assert_task_state[1 - 2*!!( | |||
| 229 | /* get_task_state() */ | 229 | /* get_task_state() */ |
| 230 | #define TASK_REPORT (TASK_RUNNING | TASK_INTERRUPTIBLE | \ | 230 | #define TASK_REPORT (TASK_RUNNING | TASK_INTERRUPTIBLE | \ |
| 231 | TASK_UNINTERRUPTIBLE | __TASK_STOPPED | \ | 231 | TASK_UNINTERRUPTIBLE | __TASK_STOPPED | \ |
| 232 | __TASK_TRACED) | 232 | __TASK_TRACED | EXIT_ZOMBIE | EXIT_DEAD) |
| 233 | 233 | ||
| 234 | #define task_is_traced(task) ((task->state & __TASK_TRACED) != 0) | 234 | #define task_is_traced(task) ((task->state & __TASK_TRACED) != 0) |
| 235 | #define task_is_stopped(task) ((task->state & __TASK_STOPPED) != 0) | 235 | #define task_is_stopped(task) ((task->state & __TASK_STOPPED) != 0) |
| @@ -391,22 +391,33 @@ arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr, | |||
| 391 | static inline void arch_pick_mmap_layout(struct mm_struct *mm) {} | 391 | static inline void arch_pick_mmap_layout(struct mm_struct *mm) {} |
| 392 | #endif | 392 | #endif |
| 393 | 393 | ||
| 394 | |||
| 395 | extern void set_dumpable(struct mm_struct *mm, int value); | ||
| 396 | extern int get_dumpable(struct mm_struct *mm); | ||
| 397 | |||
| 398 | #define SUID_DUMP_DISABLE 0 /* No setuid dumping */ | 394 | #define SUID_DUMP_DISABLE 0 /* No setuid dumping */ |
| 399 | #define SUID_DUMP_USER 1 /* Dump as user of process */ | 395 | #define SUID_DUMP_USER 1 /* Dump as user of process */ |
| 400 | #define SUID_DUMP_ROOT 2 /* Dump as root */ | 396 | #define SUID_DUMP_ROOT 2 /* Dump as root */ |
| 401 | 397 | ||
| 402 | /* mm flags */ | 398 | /* mm flags */ |
| 403 | /* dumpable bits */ | ||
| 404 | #define MMF_DUMPABLE 0 /* core dump is permitted */ | ||
| 405 | #define MMF_DUMP_SECURELY 1 /* core file is readable only by root */ | ||
| 406 | 399 | ||
| 400 | /* for SUID_DUMP_* above */ | ||
| 407 | #define MMF_DUMPABLE_BITS 2 | 401 | #define MMF_DUMPABLE_BITS 2 |
| 408 | #define MMF_DUMPABLE_MASK ((1 << MMF_DUMPABLE_BITS) - 1) | 402 | #define MMF_DUMPABLE_MASK ((1 << MMF_DUMPABLE_BITS) - 1) |
| 409 | 403 | ||
| 404 | extern void set_dumpable(struct mm_struct *mm, int value); | ||
| 405 | /* | ||
| 406 | * This returns the actual value of the suid_dumpable flag. For things | ||
| 407 | * that are using this for checking for privilege transitions, it must | ||
| 408 | * test against SUID_DUMP_USER rather than treating it as a boolean | ||
| 409 | * value. | ||
| 410 | */ | ||
| 411 | static inline int __get_dumpable(unsigned long mm_flags) | ||
| 412 | { | ||
| 413 | return mm_flags & MMF_DUMPABLE_MASK; | ||
| 414 | } | ||
| 415 | |||
| 416 | static inline int get_dumpable(struct mm_struct *mm) | ||
| 417 | { | ||
| 418 | return __get_dumpable(mm->flags); | ||
| 419 | } | ||
| 420 | |||
| 410 | /* coredump filter bits */ | 421 | /* coredump filter bits */ |
| 411 | #define MMF_DUMP_ANON_PRIVATE 2 | 422 | #define MMF_DUMP_ANON_PRIVATE 2 |
| 412 | #define MMF_DUMP_ANON_SHARED 3 | 423 | #define MMF_DUMP_ANON_SHARED 3 |
| @@ -1228,7 +1239,6 @@ struct task_struct { | |||
| 1228 | /* Used for emulating ABI behavior of previous Linux versions */ | 1239 | /* Used for emulating ABI behavior of previous Linux versions */ |
| 1229 | unsigned int personality; | 1240 | unsigned int personality; |
| 1230 | 1241 | ||
| 1231 | unsigned did_exec:1; | ||
| 1232 | unsigned in_execve:1; /* Tell the LSMs that the process is doing an | 1242 | unsigned in_execve:1; /* Tell the LSMs that the process is doing an |
| 1233 | * execve */ | 1243 | * execve */ |
| 1234 | unsigned in_iowait:1; | 1244 | unsigned in_iowait:1; |
| @@ -2284,8 +2294,6 @@ extern struct mm_struct *get_task_mm(struct task_struct *task); | |||
| 2284 | extern struct mm_struct *mm_access(struct task_struct *task, unsigned int mode); | 2294 | extern struct mm_struct *mm_access(struct task_struct *task, unsigned int mode); |
| 2285 | /* Remove the current tasks stale references to the old mm_struct */ | 2295 | /* Remove the current tasks stale references to the old mm_struct */ |
| 2286 | extern void mm_release(struct task_struct *, struct mm_struct *); | 2296 | extern void mm_release(struct task_struct *, struct mm_struct *); |
| 2287 | /* Allocate a new mm structure and copy contents from tsk->mm */ | ||
| 2288 | extern struct mm_struct *dup_mm(struct task_struct *tsk); | ||
| 2289 | 2297 | ||
| 2290 | extern int copy_thread(unsigned long, unsigned long, unsigned long, | 2298 | extern int copy_thread(unsigned long, unsigned long, unsigned long, |
| 2291 | struct task_struct *); | 2299 | struct task_struct *); |
diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h index 31e0193cb0c5..b13cf430764f 100644 --- a/include/linux/sched/sysctl.h +++ b/include/linux/sched/sysctl.h | |||
| @@ -99,4 +99,8 @@ extern int sched_rt_handler(struct ctl_table *table, int write, | |||
| 99 | void __user *buffer, size_t *lenp, | 99 | void __user *buffer, size_t *lenp, |
| 100 | loff_t *ppos); | 100 | loff_t *ppos); |
| 101 | 101 | ||
| 102 | extern int sysctl_numa_balancing(struct ctl_table *table, int write, | ||
| 103 | void __user *buffer, size_t *lenp, | ||
| 104 | loff_t *ppos); | ||
| 105 | |||
| 102 | #endif /* _SCHED_SYSCTL_H */ | 106 | #endif /* _SCHED_SYSCTL_H */ |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 1e2f4fe12773..a060142aa5f5 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
| @@ -513,7 +513,9 @@ static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) | |||
| 513 | * | 513 | * |
| 514 | * Both the root cache and the child caches will have it. For the root cache, | 514 | * Both the root cache and the child caches will have it. For the root cache, |
| 515 | * this will hold a dynamically allocated array large enough to hold | 515 | * this will hold a dynamically allocated array large enough to hold |
| 516 | * information about the currently limited memcgs in the system. | 516 | * information about the currently limited memcgs in the system. To allow the |
| 517 | * array to be accessed without taking any locks, on relocation we free the old | ||
| 518 | * version only after a grace period. | ||
| 517 | * | 519 | * |
| 518 | * Child caches will hold extra metadata needed for its operation. Fields are: | 520 | * Child caches will hold extra metadata needed for its operation. Fields are: |
| 519 | * | 521 | * |
| @@ -528,7 +530,10 @@ static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) | |||
| 528 | struct memcg_cache_params { | 530 | struct memcg_cache_params { |
| 529 | bool is_root_cache; | 531 | bool is_root_cache; |
| 530 | union { | 532 | union { |
| 531 | struct kmem_cache *memcg_caches[0]; | 533 | struct { |
| 534 | struct rcu_head rcu_head; | ||
| 535 | struct kmem_cache *memcg_caches[0]; | ||
| 536 | }; | ||
| 532 | struct { | 537 | struct { |
| 533 | struct mem_cgroup *memcg; | 538 | struct mem_cgroup *memcg; |
| 534 | struct list_head list; | 539 | struct list_head list; |
diff --git a/include/linux/w1-gpio.h b/include/linux/w1-gpio.h index 065e3ae79ab0..d58594a32324 100644 --- a/include/linux/w1-gpio.h +++ b/include/linux/w1-gpio.h | |||
| @@ -20,6 +20,7 @@ struct w1_gpio_platform_data { | |||
| 20 | unsigned int is_open_drain:1; | 20 | unsigned int is_open_drain:1; |
| 21 | void (*enable_external_pullup)(int enable); | 21 | void (*enable_external_pullup)(int enable); |
| 22 | unsigned int ext_pullup_enable_pin; | 22 | unsigned int ext_pullup_enable_pin; |
| 23 | unsigned int pullup_duration; | ||
| 23 | }; | 24 | }; |
| 24 | 25 | ||
| 25 | #endif /* _LINUX_W1_GPIO_H */ | 26 | #endif /* _LINUX_W1_GPIO_H */ |
diff --git a/include/uapi/asm-generic/types.h b/include/uapi/asm-generic/types.h index bd39806013b5..a3877926b0d4 100644 --- a/include/uapi/asm-generic/types.h +++ b/include/uapi/asm-generic/types.h | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #ifndef _ASM_GENERIC_TYPES_H | 1 | #ifndef _ASM_GENERIC_TYPES_H |
| 2 | #define _ASM_GENERIC_TYPES_H | 2 | #define _ASM_GENERIC_TYPES_H |
| 3 | /* | 3 | /* |
| 4 | * int-ll64 is used practically everywhere now, | 4 | * int-ll64 is used everywhere now. |
| 5 | * so use it as a reasonable default. | ||
| 6 | */ | 5 | */ |
| 7 | #include <asm-generic/int-ll64.h> | 6 | #include <asm-generic/int-ll64.h> |
| 8 | 7 | ||
diff --git a/include/uapi/linux/dn.h b/include/uapi/linux/dn.h index 5fbdd3d49eba..4295c745f342 100644 --- a/include/uapi/linux/dn.h +++ b/include/uapi/linux/dn.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef _LINUX_DN_H | 1 | #ifndef _LINUX_DN_H |
| 2 | #define _LINUX_DN_H | 2 | #define _LINUX_DN_H |
| 3 | 3 | ||
| 4 | #include <linux/ioctl.h> | ||
| 4 | #include <linux/types.h> | 5 | #include <linux/types.h> |
| 5 | #include <linux/if_ether.h> | 6 | #include <linux/if_ether.h> |
| 6 | 7 | ||
diff --git a/include/uapi/linux/nfs4.h b/include/uapi/linux/nfs4.h index 788128ebac45..35f5f4c6c260 100644 --- a/include/uapi/linux/nfs4.h +++ b/include/uapi/linux/nfs4.h | |||
| @@ -150,7 +150,7 @@ | |||
| 150 | #define NFS4_SECINFO_STYLE4_CURRENT_FH 0 | 150 | #define NFS4_SECINFO_STYLE4_CURRENT_FH 0 |
| 151 | #define NFS4_SECINFO_STYLE4_PARENT 1 | 151 | #define NFS4_SECINFO_STYLE4_PARENT 1 |
| 152 | 152 | ||
| 153 | #define NFS4_MAX_UINT64 (~(u64)0) | 153 | #define NFS4_MAX_UINT64 (~(__u64)0) |
| 154 | 154 | ||
| 155 | /* An NFS4 sessions server must support at least NFS4_MAX_OPS operations. | 155 | /* An NFS4 sessions server must support at least NFS4_MAX_OPS operations. |
| 156 | * If a compound requires more operations, adjust NFS4_MAX_OPS accordingly. | 156 | * If a compound requires more operations, adjust NFS4_MAX_OPS accordingly. |
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index e244ed412745..853bc1ccb395 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h | |||
| @@ -788,7 +788,7 @@ union perf_mem_data_src { | |||
| 788 | #define PERF_MEM_TLB_SHIFT 26 | 788 | #define PERF_MEM_TLB_SHIFT 26 |
| 789 | 789 | ||
| 790 | #define PERF_MEM_S(a, s) \ | 790 | #define PERF_MEM_S(a, s) \ |
| 791 | (((u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT) | 791 | (((__u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT) |
| 792 | 792 | ||
| 793 | /* | 793 | /* |
| 794 | * single taken branch record layout: | 794 | * single taken branch record layout: |
diff --git a/include/uapi/linux/ppp-ioctl.h b/include/uapi/linux/ppp-ioctl.h index 2d9a8859550a..63a23a3b8bb7 100644 --- a/include/uapi/linux/ppp-ioctl.h +++ b/include/uapi/linux/ppp-ioctl.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
| 14 | #include <linux/compiler.h> | 14 | #include <linux/compiler.h> |
| 15 | #include <linux/ppp_defs.h> | ||
| 15 | 16 | ||
| 16 | /* | 17 | /* |
| 17 | * Bit definitions for flags argument to PPPIOCGFLAGS/PPPIOCSFLAGS. | 18 | * Bit definitions for flags argument to PPPIOCGFLAGS/PPPIOCSFLAGS. |
