Merge branch 'master' into for-next
Pull linus#master to merge PER_CPU_DEF_ATTRIBUTES and alpha build fix changes. As alpha in percpu tree uses 'weak' attribute instead of inline assembly, there's no need for __used attribute. Conflicts: arch/alpha/include/asm/percpu.h arch/mn10300/kernel/vmlinux.lds.S include/linux/percpu-defs.h
This commit is contained in:
@ -340,8 +340,6 @@ config DEBUG_KMEMLEAK
|
||||
bool "Kernel memory leak detector"
|
||||
depends on DEBUG_KERNEL && EXPERIMENTAL && (X86 || ARM) && \
|
||||
!MEMORY_HOTPLUG
|
||||
select DEBUG_SLAB if SLAB
|
||||
select SLUB_DEBUG if SLUB
|
||||
select DEBUG_FS if SYSFS
|
||||
select STACKTRACE if STACKTRACE_SUPPORT
|
||||
select KALLSYMS
|
||||
@ -355,9 +353,24 @@ config DEBUG_KMEMLEAK
|
||||
allocations. See Documentation/kmemleak.txt for more
|
||||
details.
|
||||
|
||||
Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances
|
||||
of finding leaks due to the slab objects poisoning.
|
||||
|
||||
In order to access the kmemleak file, debugfs needs to be
|
||||
mounted (usually at /sys/kernel/debug).
|
||||
|
||||
config DEBUG_KMEMLEAK_EARLY_LOG_SIZE
|
||||
int "Maximum kmemleak early log entries"
|
||||
depends on DEBUG_KMEMLEAK
|
||||
range 200 2000
|
||||
default 400
|
||||
help
|
||||
Kmemleak must track all the memory allocations to avoid
|
||||
reporting false positives. Since memory may be allocated or
|
||||
freed before kmemleak is initialised, an early log buffer is
|
||||
used to store these actions. If kmemleak reports "early log
|
||||
buffer exceeded", please increase this value.
|
||||
|
||||
config DEBUG_KMEMLEAK_TEST
|
||||
tristate "Simple test for the kernel memory leak detector"
|
||||
depends on DEBUG_KMEMLEAK
|
||||
|
@ -55,7 +55,11 @@ static unsigned int do_csum(const unsigned char *buff, int len)
|
||||
goto out;
|
||||
odd = 1 & (unsigned long) buff;
|
||||
if (odd) {
|
||||
#ifdef __LITTLE_ENDIAN
|
||||
result = *buff;
|
||||
#else
|
||||
result += (*buff << 8);
|
||||
#endif
|
||||
len--;
|
||||
buff++;
|
||||
}
|
||||
@ -71,7 +75,7 @@ static unsigned int do_csum(const unsigned char *buff, int len)
|
||||
if (count) {
|
||||
unsigned long carry = 0;
|
||||
do {
|
||||
unsigned long w = *(unsigned long *) buff;
|
||||
unsigned long w = *(unsigned int *) buff;
|
||||
count--;
|
||||
buff += 4;
|
||||
result += carry;
|
||||
@ -87,7 +91,11 @@ static unsigned int do_csum(const unsigned char *buff, int len)
|
||||
}
|
||||
}
|
||||
if (len & 1)
|
||||
#ifdef __LITTLE_ENDIAN
|
||||
result += *buff;
|
||||
#else
|
||||
result += (*buff << 8);
|
||||
#endif
|
||||
result = from32to16(result);
|
||||
if (odd)
|
||||
result = ((result >> 8) & 0xff) | ((result & 0xff) << 8);
|
||||
|
Reference in New Issue
Block a user