diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig.kasan | 1 | ||||
| -rw-r--r-- | lib/percpu_ida.c | 2 | ||||
| -rw-r--r-- | lib/scatterlist.c | 6 | ||||
| -rw-r--r-- | lib/test_printf.c | 7 |
4 files changed, 2 insertions, 14 deletions
diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan index 3d35d062970d..c253c1b46c6b 100644 --- a/lib/Kconfig.kasan +++ b/lib/Kconfig.kasan | |||
| @@ -6,6 +6,7 @@ if HAVE_ARCH_KASAN | |||
| 6 | config KASAN | 6 | config KASAN |
| 7 | bool "KASan: runtime memory debugger" | 7 | bool "KASan: runtime memory debugger" |
| 8 | depends on SLUB || (SLAB && !DEBUG_SLAB) | 8 | depends on SLUB || (SLAB && !DEBUG_SLAB) |
| 9 | select SLUB_DEBUG if SLUB | ||
| 9 | select CONSTRUCTORS | 10 | select CONSTRUCTORS |
| 10 | select STACKDEPOT | 11 | select STACKDEPOT |
| 11 | help | 12 | help |
diff --git a/lib/percpu_ida.c b/lib/percpu_ida.c index 9bbd9c5d375a..beb14839b41a 100644 --- a/lib/percpu_ida.c +++ b/lib/percpu_ida.c | |||
| @@ -141,7 +141,7 @@ int percpu_ida_alloc(struct percpu_ida *pool, int state) | |||
| 141 | spin_lock_irqsave(&tags->lock, flags); | 141 | spin_lock_irqsave(&tags->lock, flags); |
| 142 | 142 | ||
| 143 | /* Fastpath */ | 143 | /* Fastpath */ |
| 144 | if (likely(tags->nr_free >= 0)) { | 144 | if (likely(tags->nr_free)) { |
| 145 | tag = tags->freelist[--tags->nr_free]; | 145 | tag = tags->freelist[--tags->nr_free]; |
| 146 | spin_unlock_irqrestore(&tags->lock, flags); | 146 | spin_unlock_irqrestore(&tags->lock, flags); |
| 147 | return tag; | 147 | return tag; |
diff --git a/lib/scatterlist.c b/lib/scatterlist.c index 1642fd507a96..7c6096a71704 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c | |||
| @@ -24,9 +24,6 @@ | |||
| 24 | **/ | 24 | **/ |
| 25 | struct scatterlist *sg_next(struct scatterlist *sg) | 25 | struct scatterlist *sg_next(struct scatterlist *sg) |
| 26 | { | 26 | { |
| 27 | #ifdef CONFIG_DEBUG_SG | ||
| 28 | BUG_ON(sg->sg_magic != SG_MAGIC); | ||
| 29 | #endif | ||
| 30 | if (sg_is_last(sg)) | 27 | if (sg_is_last(sg)) |
| 31 | return NULL; | 28 | return NULL; |
| 32 | 29 | ||
| @@ -111,10 +108,7 @@ struct scatterlist *sg_last(struct scatterlist *sgl, unsigned int nents) | |||
| 111 | for_each_sg(sgl, sg, nents, i) | 108 | for_each_sg(sgl, sg, nents, i) |
| 112 | ret = sg; | 109 | ret = sg; |
| 113 | 110 | ||
| 114 | #ifdef CONFIG_DEBUG_SG | ||
| 115 | BUG_ON(sgl[0].sg_magic != SG_MAGIC); | ||
| 116 | BUG_ON(!sg_is_last(ret)); | 111 | BUG_ON(!sg_is_last(ret)); |
| 117 | #endif | ||
| 118 | return ret; | 112 | return ret; |
| 119 | } | 113 | } |
| 120 | EXPORT_SYMBOL(sg_last); | 114 | EXPORT_SYMBOL(sg_last); |
diff --git a/lib/test_printf.c b/lib/test_printf.c index b2aa8f514844..cea592f402ed 100644 --- a/lib/test_printf.c +++ b/lib/test_printf.c | |||
| @@ -260,13 +260,6 @@ plain(void) | |||
| 260 | { | 260 | { |
| 261 | int err; | 261 | int err; |
| 262 | 262 | ||
| 263 | /* | ||
| 264 | * Make sure crng is ready. Otherwise we get "(ptrval)" instead | ||
| 265 | * of a hashed address when printing '%p' in plain_hash() and | ||
| 266 | * plain_format(). | ||
| 267 | */ | ||
| 268 | wait_for_random_bytes(); | ||
| 269 | |||
| 270 | err = plain_hash(); | 263 | err = plain_hash(); |
| 271 | if (err) { | 264 | if (err) { |
| 272 | pr_warn("plain 'p' does not appear to be hashed\n"); | 265 | pr_warn("plain 'p' does not appear to be hashed\n"); |
