aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-06-10 19:43:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-10 19:43:53 -0400
commitf5278565be81c9dccc10dc83d99f690f572b4fa7 (patch)
tree679d324d68a5c4ce62d7cdb246db3b316cad8154
parente64f638483a21105c7ce330d543fa1f1c35b5bc7 (diff)
parent5ec45a192fe6e287f0fc06d5ca4f3bd446d94803 (diff)
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton: "The gcc-4.4.4 workaround has actually been merged into a KVM tree by Paolo but it is stuck in linux-next and mainline needs it" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: arch/x86/kvm/mmu.c: work around gcc-4.4.4 bug sched, numa: do not hint for NUMA balancing on VM_MIXEDMAP mappings zsmalloc: fix a null pointer dereference in destroy_handle_cache() mm: memcontrol: fix false-positive VM_BUG_ON() on -rt checkpatch: fix "GLOBAL_INITIALISERS" test zram: clear disk io accounting when reset zram device memcg: do not call reclaim if !__GFP_WAIT mm/memory_hotplug.c: set zone->wait_table to null after freeing it
-rw-r--r--arch/x86/kvm/mmu.c14
-rw-r--r--drivers/block/zram/zram_drv.c2
-rw-r--r--kernel/sched/fair.c2
-rw-r--r--mm/memcontrol.c6
-rw-r--r--mm/memory_hotplug.c4
-rw-r--r--mm/zsmalloc.c3
-rwxr-xr-xscripts/checkpatch.pl4
7 files changed, 20 insertions, 15 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 44a7d2515497..b73337634214 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -4215,13 +4215,13 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
4215 u64 entry, gentry, *spte; 4215 u64 entry, gentry, *spte;
4216 int npte; 4216 int npte;
4217 bool remote_flush, local_flush, zap_page; 4217 bool remote_flush, local_flush, zap_page;
4218 union kvm_mmu_page_role mask = (union kvm_mmu_page_role) { 4218 union kvm_mmu_page_role mask = { };
4219 .cr0_wp = 1, 4219
4220 .cr4_pae = 1, 4220 mask.cr0_wp = 1;
4221 .nxe = 1, 4221 mask.cr4_pae = 1;
4222 .smep_andnot_wp = 1, 4222 mask.nxe = 1;
4223 .smap_andnot_wp = 1, 4223 mask.smep_andnot_wp = 1;
4224 }; 4224 mask.smap_andnot_wp = 1;
4225 4225
4226 /* 4226 /*
4227 * If we don't have indirect shadow pages, it means no page is 4227 * If we don't have indirect shadow pages, it means no page is
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 8dcbced0eafd..6e134f4759c0 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -805,7 +805,9 @@ static void zram_reset_device(struct zram *zram)
805 memset(&zram->stats, 0, sizeof(zram->stats)); 805 memset(&zram->stats, 0, sizeof(zram->stats));
806 zram->disksize = 0; 806 zram->disksize = 0;
807 zram->max_comp_streams = 1; 807 zram->max_comp_streams = 1;
808
808 set_capacity(zram->disk, 0); 809 set_capacity(zram->disk, 0);
810 part_stat_set_all(&zram->disk->part0, 0);
809 811
810 up_write(&zram->init_lock); 812 up_write(&zram->init_lock);
811 /* I/O operation under all of CPU are done so let's free */ 813 /* I/O operation under all of CPU are done so let's free */
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index ffeaa4105e48..c2980e8733bc 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2181,7 +2181,7 @@ void task_numa_work(struct callback_head *work)
2181 } 2181 }
2182 for (; vma; vma = vma->vm_next) { 2182 for (; vma; vma = vma->vm_next) {
2183 if (!vma_migratable(vma) || !vma_policy_mof(vma) || 2183 if (!vma_migratable(vma) || !vma_policy_mof(vma) ||
2184 is_vm_hugetlb_page(vma)) { 2184 is_vm_hugetlb_page(vma) || (vma->vm_flags & VM_MIXEDMAP)) {
2185 continue; 2185 continue;
2186 } 2186 }
2187 2187
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 14c2f2017e37..a04225d372ba 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2323,6 +2323,8 @@ done_restock:
2323 css_get_many(&memcg->css, batch); 2323 css_get_many(&memcg->css, batch);
2324 if (batch > nr_pages) 2324 if (batch > nr_pages)
2325 refill_stock(memcg, batch - nr_pages); 2325 refill_stock(memcg, batch - nr_pages);
2326 if (!(gfp_mask & __GFP_WAIT))
2327 goto done;
2326 /* 2328 /*
2327 * If the hierarchy is above the normal consumption range, 2329 * If the hierarchy is above the normal consumption range,
2328 * make the charging task trim their excess contribution. 2330 * make the charging task trim their excess contribution.
@@ -5833,9 +5835,7 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry)
5833 if (!mem_cgroup_is_root(memcg)) 5835 if (!mem_cgroup_is_root(memcg))
5834 page_counter_uncharge(&memcg->memory, 1); 5836 page_counter_uncharge(&memcg->memory, 1);
5835 5837
5836 /* XXX: caller holds IRQ-safe mapping->tree_lock */ 5838 /* Caller disabled preemption with mapping->tree_lock */
5837 VM_BUG_ON(!irqs_disabled());
5838
5839 mem_cgroup_charge_statistics(memcg, page, -1); 5839 mem_cgroup_charge_statistics(memcg, page, -1);
5840 memcg_check_events(memcg, page); 5840 memcg_check_events(memcg, page);
5841} 5841}
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 457bde530cbe..9e88f749aa51 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -1969,8 +1969,10 @@ void try_offline_node(int nid)
1969 * wait_table may be allocated from boot memory, 1969 * wait_table may be allocated from boot memory,
1970 * here only free if it's allocated by vmalloc. 1970 * here only free if it's allocated by vmalloc.
1971 */ 1971 */
1972 if (is_vmalloc_addr(zone->wait_table)) 1972 if (is_vmalloc_addr(zone->wait_table)) {
1973 vfree(zone->wait_table); 1973 vfree(zone->wait_table);
1974 zone->wait_table = NULL;
1975 }
1974 } 1976 }
1975} 1977}
1976EXPORT_SYMBOL(try_offline_node); 1978EXPORT_SYMBOL(try_offline_node);
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 08bd7a3d464a..a8b5e749e84e 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -289,7 +289,8 @@ static int create_handle_cache(struct zs_pool *pool)
289 289
290static void destroy_handle_cache(struct zs_pool *pool) 290static void destroy_handle_cache(struct zs_pool *pool)
291{ 291{
292 kmem_cache_destroy(pool->handle_cachep); 292 if (pool->handle_cachep)
293 kmem_cache_destroy(pool->handle_cachep);
293} 294}
294 295
295static unsigned long alloc_handle(struct zs_pool *pool) 296static unsigned long alloc_handle(struct zs_pool *pool)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 89b1df4e72ab..c5ec977b9c37 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3169,12 +3169,12 @@ sub process {
3169 } 3169 }
3170 3170
3171# check for global initialisers. 3171# check for global initialisers.
3172 if ($line =~ /^\+(\s*$Type\s*$Ident\s*(?:\s+$Modifier))*\s*=\s*(0|NULL|false)\s*;/) { 3172 if ($line =~ /^\+$Type\s*$Ident(?:\s+$Modifier)*\s*=\s*(?:0|NULL|false)\s*;/) {
3173 if (ERROR("GLOBAL_INITIALISERS", 3173 if (ERROR("GLOBAL_INITIALISERS",
3174 "do not initialise globals to 0 or NULL\n" . 3174 "do not initialise globals to 0 or NULL\n" .
3175 $herecurr) && 3175 $herecurr) &&
3176 $fix) { 3176 $fix) {
3177 $fixed[$fixlinenr] =~ s/($Type\s*$Ident\s*(?:\s+$Modifier))*\s*=\s*(0|NULL|false)\s*;/$1;/; 3177 $fixed[$fixlinenr] =~ s/(^.$Type\s*$Ident(?:\s+$Modifier)*)\s*=\s*(0|NULL|false)\s*;/$1;/;
3178 } 3178 }
3179 } 3179 }
3180# check for static initialisers. 3180# check for static initialisers.