diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 5 | ||||
-rw-r--r-- | lib/radix-tree.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 9e06b7f5ecf1..1b4afd2e6ca0 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -994,13 +994,16 @@ config FAULT_INJECTION_STACKTRACE_FILTER | |||
994 | 994 | ||
995 | config LATENCYTOP | 995 | config LATENCYTOP |
996 | bool "Latency measuring infrastructure" | 996 | bool "Latency measuring infrastructure" |
997 | depends on HAVE_LATENCYTOP_SUPPORT | ||
998 | depends on DEBUG_KERNEL | ||
999 | depends on STACKTRACE_SUPPORT | ||
1000 | depends on PROC_FS | ||
997 | select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE | 1001 | select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE |
998 | select KALLSYMS | 1002 | select KALLSYMS |
999 | select KALLSYMS_ALL | 1003 | select KALLSYMS_ALL |
1000 | select STACKTRACE | 1004 | select STACKTRACE |
1001 | select SCHEDSTATS | 1005 | select SCHEDSTATS |
1002 | select SCHED_DEBUG | 1006 | select SCHED_DEBUG |
1003 | depends on HAVE_LATENCYTOP_SUPPORT | ||
1004 | help | 1007 | help |
1005 | Enable this option if you want to use the LatencyTOP tool | 1008 | Enable this option if you want to use the LatencyTOP tool |
1006 | to find out which userspace is blocking on what kernel operations. | 1009 | to find out which userspace is blocking on what kernel operations. |
diff --git a/lib/radix-tree.c b/lib/radix-tree.c index e0ee8cb37e41..efd16fa80b1c 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c | |||
@@ -634,6 +634,8 @@ EXPORT_SYMBOL(radix_tree_tag_get); | |||
634 | * | 634 | * |
635 | * The function returns number of leaves where the tag was set and sets | 635 | * The function returns number of leaves where the tag was set and sets |
636 | * *first_indexp to the first unscanned index. | 636 | * *first_indexp to the first unscanned index. |
637 | * WARNING! *first_indexp can wrap if last_index is ULONG_MAX. Caller must | ||
638 | * be prepared to handle that. | ||
637 | */ | 639 | */ |
638 | unsigned long radix_tree_range_tag_if_tagged(struct radix_tree_root *root, | 640 | unsigned long radix_tree_range_tag_if_tagged(struct radix_tree_root *root, |
639 | unsigned long *first_indexp, unsigned long last_index, | 641 | unsigned long *first_indexp, unsigned long last_index, |
@@ -708,7 +710,8 @@ unsigned long radix_tree_range_tag_if_tagged(struct radix_tree_root *root, | |||
708 | next: | 710 | next: |
709 | /* Go to next item at level determined by 'shift' */ | 711 | /* Go to next item at level determined by 'shift' */ |
710 | index = ((index >> shift) + 1) << shift; | 712 | index = ((index >> shift) + 1) << shift; |
711 | if (index > last_index) | 713 | /* Overflow can happen when last_index is ~0UL... */ |
714 | if (index > last_index || !index) | ||
712 | break; | 715 | break; |
713 | if (tagged >= nr_to_tag) | 716 | if (tagged >= nr_to_tag) |
714 | break; | 717 | break; |