diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-11 08:18:45 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-11 08:18:45 -0500 |
commit | 9374020a78fce13a1cf2edf3d26f6dd7231b5c3d (patch) | |
tree | 50c8629e6c6222c5b9681506b52afbde818c5e56 /lib | |
parent | d2a0db1ee01aea154ccc460e45a16857e32c4427 (diff) | |
parent | 29594404d7fe73cd80eaa4ee8c43dcc53970c60e (diff) |
Merge tag 'v3.7' into v4l_for_linus
Linux 3.7
* tag 'v3.7': (1545 commits)
Linux 3.7
Input: matrix-keymap - provide proper module license
Revert "revert "Revert "mm: remove __GFP_NO_KSWAPD""" and associated damage
ipv4: ip_check_defrag must not modify skb before unsharing
Revert "mm: avoid waking kswapd for THP allocations when compaction is deferred or contended"
inet_diag: validate port comparison byte code to prevent unsafe reads
inet_diag: avoid unsafe and nonsensical prefix matches in inet_diag_bc_run()
inet_diag: validate byte code to prevent oops in inet_diag_bc_run()
inet_diag: fix oops for IPv4 AF_INET6 TCP SYN-RECV state
mm: vmscan: fix inappropriate zone congestion clearing
vfs: fix O_DIRECT read past end of block device
net: gro: fix possible panic in skb_gro_receive()
tcp: bug fix Fast Open client retransmission
tmpfs: fix shared mempolicy leak
mm: vmscan: do not keep kswapd looping forever due to individual uncompactable zones
mm: compaction: validate pfn range passed to isolate_freepages_block
mmc: sh-mmcif: avoid oops on spurious interrupts (second try)
Revert misapplied "mmc: sh-mmcif: avoid oops on spurious interrupts"
mmc: sdhci-s3c: fix missing clock for gpio card-detect
lib/Makefile: Fix oid_registry build dependency
...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile | 2 | ||||
-rw-r--r-- | lib/asn1_decoder.c | 2 | ||||
-rw-r--r-- | lib/dma-debug.c | 4 | ||||
-rw-r--r-- | lib/genalloc.c | 2 | ||||
-rw-r--r-- | lib/mpi/longlong.h | 19 |
5 files changed, 22 insertions, 7 deletions
diff --git a/lib/Makefile b/lib/Makefile index 821a16229111..a08b791200f3 100644 --- a/lib/Makefile +++ b/lib/Makefile | |||
@@ -163,7 +163,7 @@ $(obj)/crc32table.h: $(obj)/gen_crc32table | |||
163 | # | 163 | # |
164 | obj-$(CONFIG_OID_REGISTRY) += oid_registry.o | 164 | obj-$(CONFIG_OID_REGISTRY) += oid_registry.o |
165 | 165 | ||
166 | $(obj)/oid_registry.c: $(obj)/oid_registry_data.c | 166 | $(obj)/oid_registry.o: $(obj)/oid_registry_data.c |
167 | 167 | ||
168 | $(obj)/oid_registry_data.c: $(srctree)/include/linux/oid_registry.h \ | 168 | $(obj)/oid_registry_data.c: $(srctree)/include/linux/oid_registry.h \ |
169 | $(src)/build_OID_registry | 169 | $(src)/build_OID_registry |
diff --git a/lib/asn1_decoder.c b/lib/asn1_decoder.c index de2c8b5a715b..5293d2433029 100644 --- a/lib/asn1_decoder.c +++ b/lib/asn1_decoder.c | |||
@@ -91,7 +91,7 @@ next_tag: | |||
91 | 91 | ||
92 | /* Extract the length */ | 92 | /* Extract the length */ |
93 | len = data[dp++]; | 93 | len = data[dp++]; |
94 | if (len < 0x7f) { | 94 | if (len <= 0x7f) { |
95 | dp += len; | 95 | dp += len; |
96 | goto next_tag; | 96 | goto next_tag; |
97 | } | 97 | } |
diff --git a/lib/dma-debug.c b/lib/dma-debug.c index b9087bff008b..d84beb994f36 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c | |||
@@ -264,7 +264,7 @@ static struct dma_debug_entry *__hash_bucket_find(struct hash_bucket *bucket, | |||
264 | match_fn match) | 264 | match_fn match) |
265 | { | 265 | { |
266 | struct dma_debug_entry *entry, *ret = NULL; | 266 | struct dma_debug_entry *entry, *ret = NULL; |
267 | int matches = 0, match_lvl, last_lvl = 0; | 267 | int matches = 0, match_lvl, last_lvl = -1; |
268 | 268 | ||
269 | list_for_each_entry(entry, &bucket->list, list) { | 269 | list_for_each_entry(entry, &bucket->list, list) { |
270 | if (!match(ref, entry)) | 270 | if (!match(ref, entry)) |
@@ -293,7 +293,7 @@ static struct dma_debug_entry *__hash_bucket_find(struct hash_bucket *bucket, | |||
293 | } else if (match_lvl > last_lvl) { | 293 | } else if (match_lvl > last_lvl) { |
294 | /* | 294 | /* |
295 | * We found an entry that fits better then the | 295 | * We found an entry that fits better then the |
296 | * previous one | 296 | * previous one or it is the 1st match. |
297 | */ | 297 | */ |
298 | last_lvl = match_lvl; | 298 | last_lvl = match_lvl; |
299 | ret = entry; | 299 | ret = entry; |
diff --git a/lib/genalloc.c b/lib/genalloc.c index ca208a92628c..54920433705a 100644 --- a/lib/genalloc.c +++ b/lib/genalloc.c | |||
@@ -178,7 +178,7 @@ int gen_pool_add_virt(struct gen_pool *pool, unsigned long virt, phys_addr_t phy | |||
178 | struct gen_pool_chunk *chunk; | 178 | struct gen_pool_chunk *chunk; |
179 | int nbits = size >> pool->min_alloc_order; | 179 | int nbits = size >> pool->min_alloc_order; |
180 | int nbytes = sizeof(struct gen_pool_chunk) + | 180 | int nbytes = sizeof(struct gen_pool_chunk) + |
181 | (nbits + BITS_PER_BYTE - 1) / BITS_PER_BYTE; | 181 | BITS_TO_LONGS(nbits) * sizeof(long); |
182 | 182 | ||
183 | chunk = kmalloc_node(nbytes, GFP_KERNEL | __GFP_ZERO, nid); | 183 | chunk = kmalloc_node(nbytes, GFP_KERNEL | __GFP_ZERO, nid); |
184 | if (unlikely(chunk == NULL)) | 184 | if (unlikely(chunk == NULL)) |
diff --git a/lib/mpi/longlong.h b/lib/mpi/longlong.h index 678ce4f1e124..095ab157a521 100644 --- a/lib/mpi/longlong.h +++ b/lib/mpi/longlong.h | |||
@@ -641,7 +641,14 @@ do { \ | |||
641 | ************** MIPS ***************** | 641 | ************** MIPS ***************** |
642 | ***************************************/ | 642 | ***************************************/ |
643 | #if defined(__mips__) && W_TYPE_SIZE == 32 | 643 | #if defined(__mips__) && W_TYPE_SIZE == 32 |
644 | #if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 | 644 | #if __GNUC__ >= 4 && __GNUC_MINOR__ >= 4 |
645 | #define umul_ppmm(w1, w0, u, v) \ | ||
646 | do { \ | ||
647 | UDItype __ll = (UDItype)(u) * (v); \ | ||
648 | w1 = __ll >> 32; \ | ||
649 | w0 = __ll; \ | ||
650 | } while (0) | ||
651 | #elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7 | ||
645 | #define umul_ppmm(w1, w0, u, v) \ | 652 | #define umul_ppmm(w1, w0, u, v) \ |
646 | __asm__ ("multu %2,%3" \ | 653 | __asm__ ("multu %2,%3" \ |
647 | : "=l" ((USItype)(w0)), \ | 654 | : "=l" ((USItype)(w0)), \ |
@@ -666,7 +673,15 @@ do { \ | |||
666 | ************** MIPS/64 ************** | 673 | ************** MIPS/64 ************** |
667 | ***************************************/ | 674 | ***************************************/ |
668 | #if (defined(__mips) && __mips >= 3) && W_TYPE_SIZE == 64 | 675 | #if (defined(__mips) && __mips >= 3) && W_TYPE_SIZE == 64 |
669 | #if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 | 676 | #if __GNUC__ >= 4 && __GNUC_MINOR__ >= 4 |
677 | #define umul_ppmm(w1, w0, u, v) \ | ||
678 | do { \ | ||
679 | typedef unsigned int __ll_UTItype __attribute__((mode(TI))); \ | ||
680 | __ll_UTItype __ll = (__ll_UTItype)(u) * (v); \ | ||
681 | w1 = __ll >> 64; \ | ||
682 | w0 = __ll; \ | ||
683 | } while (0) | ||
684 | #elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7 | ||
670 | #define umul_ppmm(w1, w0, u, v) \ | 685 | #define umul_ppmm(w1, w0, u, v) \ |
671 | __asm__ ("dmultu %2,%3" \ | 686 | __asm__ ("dmultu %2,%3" \ |
672 | : "=l" ((UDItype)(w0)), \ | 687 | : "=l" ((UDItype)(w0)), \ |