diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 9 | ||||
-rw-r--r-- | lib/debugobjects.c | 1 | ||||
-rw-r--r-- | lib/dma-debug.c | 6 | ||||
-rw-r--r-- | lib/fault-inject.c | 1 | ||||
-rw-r--r-- | lib/string.c | 20 | ||||
-rw-r--r-- | lib/vsprintf.c | 2 |
6 files changed, 26 insertions, 13 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 891155817bc6..234ceb10861f 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -346,8 +346,9 @@ config SLUB_STATS | |||
346 | 346 | ||
347 | config DEBUG_KMEMLEAK | 347 | config DEBUG_KMEMLEAK |
348 | bool "Kernel memory leak detector" | 348 | bool "Kernel memory leak detector" |
349 | depends on DEBUG_KERNEL && EXPERIMENTAL && (X86 || ARM || PPC) && \ | 349 | depends on DEBUG_KERNEL && EXPERIMENTAL && !MEMORY_HOTPLUG && \ |
350 | !MEMORY_HOTPLUG | 350 | (X86 || ARM || PPC || S390) |
351 | |||
351 | select DEBUG_FS if SYSFS | 352 | select DEBUG_FS if SYSFS |
352 | select STACKTRACE if STACKTRACE_SUPPORT | 353 | select STACKTRACE if STACKTRACE_SUPPORT |
353 | select KALLSYMS | 354 | select KALLSYMS |
@@ -370,7 +371,7 @@ config DEBUG_KMEMLEAK | |||
370 | config DEBUG_KMEMLEAK_EARLY_LOG_SIZE | 371 | config DEBUG_KMEMLEAK_EARLY_LOG_SIZE |
371 | int "Maximum kmemleak early log entries" | 372 | int "Maximum kmemleak early log entries" |
372 | depends on DEBUG_KMEMLEAK | 373 | depends on DEBUG_KMEMLEAK |
373 | range 200 2000 | 374 | range 200 40000 |
374 | default 400 | 375 | default 400 |
375 | help | 376 | help |
376 | Kmemleak must track all the memory allocations to avoid | 377 | Kmemleak must track all the memory allocations to avoid |
@@ -391,7 +392,7 @@ config DEBUG_KMEMLEAK_TEST | |||
391 | 392 | ||
392 | config DEBUG_PREEMPT | 393 | config DEBUG_PREEMPT |
393 | bool "Debug preemptible kernel" | 394 | bool "Debug preemptible kernel" |
394 | depends on DEBUG_KERNEL && PREEMPT && (TRACE_IRQFLAGS_SUPPORT || PPC64) | 395 | depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT |
395 | default y | 396 | default y |
396 | help | 397 | help |
397 | If you say Y here then the kernel will use a debug variant of the | 398 | If you say Y here then the kernel will use a debug variant of the |
diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 2755a3bd16a1..eae56fddfa3b 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | #include <linux/debugobjects.h> | 10 | #include <linux/debugobjects.h> |
11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
12 | #include <linux/sched.h> | ||
12 | #include <linux/seq_file.h> | 13 | #include <linux/seq_file.h> |
13 | #include <linux/debugfs.h> | 14 | #include <linux/debugfs.h> |
14 | #include <linux/hash.h> | 15 | #include <linux/hash.h> |
diff --git a/lib/dma-debug.c b/lib/dma-debug.c index 58a9f9fc609a..ce6b7eabf674 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c | |||
@@ -819,9 +819,11 @@ static void check_unmap(struct dma_debug_entry *ref) | |||
819 | err_printk(ref->dev, entry, "DMA-API: device driver frees " | 819 | err_printk(ref->dev, entry, "DMA-API: device driver frees " |
820 | "DMA memory with different CPU address " | 820 | "DMA memory with different CPU address " |
821 | "[device address=0x%016llx] [size=%llu bytes] " | 821 | "[device address=0x%016llx] [size=%llu bytes] " |
822 | "[cpu alloc address=%p] [cpu free address=%p]", | 822 | "[cpu alloc address=0x%016llx] " |
823 | "[cpu free address=0x%016llx]", | ||
823 | ref->dev_addr, ref->size, | 824 | ref->dev_addr, ref->size, |
824 | (void *)entry->paddr, (void *)ref->paddr); | 825 | (unsigned long long)entry->paddr, |
826 | (unsigned long long)ref->paddr); | ||
825 | } | 827 | } |
826 | 828 | ||
827 | if (ref->sg_call_ents && ref->type == dma_debug_sg && | 829 | if (ref->sg_call_ents && ref->type == dma_debug_sg && |
diff --git a/lib/fault-inject.c b/lib/fault-inject.c index f97af55bdd96..7e65af70635e 100644 --- a/lib/fault-inject.c +++ b/lib/fault-inject.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
2 | #include <linux/init.h> | 2 | #include <linux/init.h> |
3 | #include <linux/random.h> | 3 | #include <linux/random.h> |
4 | #include <linux/sched.h> | ||
4 | #include <linux/stat.h> | 5 | #include <linux/stat.h> |
5 | #include <linux/types.h> | 6 | #include <linux/types.h> |
6 | #include <linux/fs.h> | 7 | #include <linux/fs.h> |
diff --git a/lib/string.c b/lib/string.c index b19b87af65a3..e96421ab9a9a 100644 --- a/lib/string.c +++ b/lib/string.c | |||
@@ -246,13 +246,17 @@ EXPORT_SYMBOL(strlcat); | |||
246 | #undef strcmp | 246 | #undef strcmp |
247 | int strcmp(const char *cs, const char *ct) | 247 | int strcmp(const char *cs, const char *ct) |
248 | { | 248 | { |
249 | signed char __res; | 249 | unsigned char c1, c2; |
250 | 250 | ||
251 | while (1) { | 251 | while (1) { |
252 | if ((__res = *cs - *ct++) != 0 || !*cs++) | 252 | c1 = *cs++; |
253 | c2 = *ct++; | ||
254 | if (c1 != c2) | ||
255 | return c1 < c2 ? -1 : 1; | ||
256 | if (!c1) | ||
253 | break; | 257 | break; |
254 | } | 258 | } |
255 | return __res; | 259 | return 0; |
256 | } | 260 | } |
257 | EXPORT_SYMBOL(strcmp); | 261 | EXPORT_SYMBOL(strcmp); |
258 | #endif | 262 | #endif |
@@ -266,14 +270,18 @@ EXPORT_SYMBOL(strcmp); | |||
266 | */ | 270 | */ |
267 | int strncmp(const char *cs, const char *ct, size_t count) | 271 | int strncmp(const char *cs, const char *ct, size_t count) |
268 | { | 272 | { |
269 | signed char __res = 0; | 273 | unsigned char c1, c2; |
270 | 274 | ||
271 | while (count) { | 275 | while (count) { |
272 | if ((__res = *cs - *ct++) != 0 || !*cs++) | 276 | c1 = *cs++; |
277 | c2 = *ct++; | ||
278 | if (c1 != c2) | ||
279 | return c1 < c2 ? -1 : 1; | ||
280 | if (!c1) | ||
273 | break; | 281 | break; |
274 | count--; | 282 | count--; |
275 | } | 283 | } |
276 | return __res; | 284 | return 0; |
277 | } | 285 | } |
278 | EXPORT_SYMBOL(strncmp); | 286 | EXPORT_SYMBOL(strncmp); |
279 | #endif | 287 | #endif |
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index b91839e9e892..33bed5e67a21 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c | |||
@@ -1771,7 +1771,7 @@ int vsscanf(const char * buf, const char * fmt, va_list args) | |||
1771 | * advance both strings to next white space | 1771 | * advance both strings to next white space |
1772 | */ | 1772 | */ |
1773 | if (*fmt == '*') { | 1773 | if (*fmt == '*') { |
1774 | while (!isspace(*fmt) && *fmt) | 1774 | while (!isspace(*fmt) && *fmt != '%' && *fmt) |
1775 | fmt++; | 1775 | fmt++; |
1776 | while (!isspace(*str) && *str) | 1776 | while (!isspace(*str) && *str) |
1777 | str++; | 1777 | str++; |