extable: skip sorting if the table is empty
authorUwe Kleine-König <[email protected]>
Wed, 11 Sep 2013 21:23:27 +0000 (14:23 -0700)
committerLinus Torvalds <[email protected]>
Wed, 11 Sep 2013 22:58:25 +0000 (15:58 -0700)
At least on ARM no-MMU the extable is empty and so there is nothing to
sort. So add a check for the table to be empty which effectively only
changes that the misleading pr_notice is suppressed.

Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: David Daney <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Borislav Petkov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/extable.c

index 67460b93b1a1cb8d60294cd90c2972ab97fd80e8..832cb28105bbb7900a6c1342a095179303734215 100644 (file)
@@ -41,7 +41,7 @@ u32 __initdata main_extable_sort_needed = 1;
 /* Sort the kernel's built-in exception table */
 void __init sort_main_extable(void)
 {
-       if (main_extable_sort_needed) {
+       if (main_extable_sort_needed && __stop___ex_table > __start___ex_table) {
                pr_notice("Sorting __ex_table...\n");
                sort_extable(__start___ex_table, __stop___ex_table);
        }