cfg80211: Fix memory leak

When a driver requests a specific regulatory domain after cfg80211 already
has one, a struct ieee80211_regdomain is leaked.

Change-Id: Id28fc9861b9c911a97bd242439eabca097d76258
Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: b7566fc363e23f0efd3fa1e1460f9421cdc0d77e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: zwliew <zhaoweiliew@gmail.com>
slub: fix a possible memory leak

Memory allocated by kstrdup should be freed,
when kmalloc(kmem_size, GFP_KERNEL) is failed.

Acked-by: Christoph Lameter <cl@linux.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Joonsoo Kim <js1304@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: zwliew <zhaoweiliew@gmail.com>
mm: backport SLUB from LK 3.8

Change-Id: I0136ce45f66d6bff928c36b58f67bb17e0a60e1b
Signed-off-by: zwliew <zhaoweiliew@gmail.com>
ARM: use -mcpu=cortex-a9 when targeting U8500 CPUs (Cortex-A9 based)

this is done in order to force compliant GCC compiler to generate the new
sdiv/udiv instructions supported by Cortex-A9 architecture

Change-Id: I975a1240956e0c74646a8575eb29f8bb37337a20
Signed-off-by: zwliew <zhaoweiliew@gmail.com>
Makefile: use only -mcpu=cortex-a9

This is really all we need.

Change-Id: I5a4e8387f00394094d4685a711a97ca41e915e8a
Signed-off-by: zwliew <zhaoweiliew@gmail.com>
android: backport timed_gpio from LK 3.8

Change-Id: I23640c472c19664d4b41ffe05af57c4383ef0939
Signed-off-by: zwliew <zhaoweiliew@gmail.com>
mm: SLUB optimization

Change-Id: I872cb0a535081b692b40348eff8fe8cfd9785b13
Signed-off-by: zwliew <zhaoweiliew@gmail.com>
lib/string.c: introduce memchr_inv()

memchr_inv() is mainly used to check whether the whole buffer is filled
with just a specified byte.

The function name and prototype are stolen from logfs and the
implementation is from SLUB.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Christoph Lameter <cl@linux-foundation.org>
Acked-by: Pekka Enberg <penberg@kernel.org>
Cc: Matt Mackall <mpm@selenic.com>
Acked-by: Joern Engel <joern@logfs.org>
Cc: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[mm/slub.c is excluded from this commit because it has already been updated]

Change-Id: I48ecb6dbe44df6c83728e5146483aed917baf5b9
Signed-off-by: zwliew <zhaoweiliew@gmail.com>
lib/memcopy: use glibc version

the kernel's memcpy and memmove is very inefficient. But the glibc version is
quite fast, in some cases it is 10 times faster than the kernel version. So I
introduce some memory copy macros and functions of the glibc to improve the
kernel version's performance.

The strategy of the memory functions is:
1. Copy bytes until the destination pointer is aligned.
2. Copy words in unrolled loops.  If the source and destination are not
   aligned in the same way, use word memory operations, but shift and merge
   two read words before writing.
3. Copy the few remaining bytes.

Signed-off-by: Miao Xie <miaox*******>

Change-Id: I6bc05ef416bf4dc3c5b9d08e5fdc72fbb9277758
Signed-off-by: zwliew <zhaoweiliew@gmail.com>
lib/string: use glibc version

the performance of memcpy and memmove of the general version is very
inefficient, this patch improved them.

Signed-off-by: Miao Xie <miaox*******>

Change-Id: Ibca20e2accbfe7e6fecbf2ff2d58f4d9197ca088
Signed-off-by: zwliew <zhaoweiliew@gmail.com>