aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-05-03 20:55:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-03 20:55:59 -0400
commitdd23f273d9a765d7f092c1bb0d1cd7aaf668077e (patch)
tree9bf826a9f553c9b0a5e852deaaf58bee56b601ac /lib
parent1684096b1ed813f621fb6cbd06e72235c1c2a0ca (diff)
parentb19385993623c1a18a686b6b271cd24d5aa96f52 (diff)
Merge branch 'akpm' (patches from Andrew)
Merge misc updates from Andrew Morton: - a few misc things - most of MM - KASAN updates * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (102 commits) kasan: separate report parts by empty lines kasan: improve double-free report format kasan: print page description after stacks kasan: improve slab object description kasan: change report header kasan: simplify address description logic kasan: change allocation and freeing stack traces headers kasan: unify report headers kasan: introduce helper functions for determining bug type mm: hwpoison: call shake_page() after try_to_unmap() for mlocked page mm: hwpoison: call shake_page() unconditionally mm/swapfile.c: fix swap space leak in error path of swap_free_entries() mm/gup.c: fix access_ok() argument type mm/truncate: avoid pointless cleancache_invalidate_inode() calls. mm/truncate: bail out early from invalidate_inode_pages2_range() if mapping is empty fs/block_dev: always invalidate cleancache in invalidate_bdev() fs: fix data invalidation in the cleancache during direct IO zram: reduce load operation in page_same_filled zram: use zram_free_page instead of open-coded zram: introduce zram data accessor ...
Diffstat (limited to 'lib')
-rw-r--r--lib/dma-debug.c8
-rw-r--r--lib/radix-tree.c2
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index b157b46cc9a6..fe4d50c992df 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -942,21 +942,17 @@ static int device_dma_allocations(struct device *dev, struct dma_debug_entry **o
942 unsigned long flags; 942 unsigned long flags;
943 int count = 0, i; 943 int count = 0, i;
944 944
945 local_irq_save(flags);
946
947 for (i = 0; i < HASH_SIZE; ++i) { 945 for (i = 0; i < HASH_SIZE; ++i) {
948 spin_lock(&dma_entry_hash[i].lock); 946 spin_lock_irqsave(&dma_entry_hash[i].lock, flags);
949 list_for_each_entry(entry, &dma_entry_hash[i].list, list) { 947 list_for_each_entry(entry, &dma_entry_hash[i].list, list) {
950 if (entry->dev == dev) { 948 if (entry->dev == dev) {
951 count += 1; 949 count += 1;
952 *out_entry = entry; 950 *out_entry = entry;
953 } 951 }
954 } 952 }
955 spin_unlock(&dma_entry_hash[i].lock); 953 spin_unlock_irqrestore(&dma_entry_hash[i].lock, flags);
956 } 954 }
957 955
958 local_irq_restore(flags);
959
960 return count; 956 return count;
961} 957}
962 958
diff --git a/lib/radix-tree.c b/lib/radix-tree.c
index 691a9ad48497..898e87998417 100644
--- a/lib/radix-tree.c
+++ b/lib/radix-tree.c
@@ -2284,6 +2284,8 @@ static int radix_tree_cpu_dead(unsigned int cpu)
2284void __init radix_tree_init(void) 2284void __init radix_tree_init(void)
2285{ 2285{
2286 int ret; 2286 int ret;
2287
2288 BUILD_BUG_ON(RADIX_TREE_MAX_TAGS + __GFP_BITS_SHIFT > 32);
2287 radix_tree_node_cachep = kmem_cache_create("radix_tree_node", 2289 radix_tree_node_cachep = kmem_cache_create("radix_tree_node",
2288 sizeof(struct radix_tree_node), 0, 2290 sizeof(struct radix_tree_node), 0,
2289 SLAB_PANIC | SLAB_RECLAIM_ACCOUNT, 2291 SLAB_PANIC | SLAB_RECLAIM_ACCOUNT,