Andrey Ryabinin
9d796e6623
gcov: fix softlockups
gcov profiling if enabled with other heavy compile-time instrumentation
like KASan could trigger following softlockups:
NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [swapper/0:1]
Modules linked in:
irq event stamp: 22823276
hardirqs last enabled at (22823275): [<ffffffff86e8d10d>] mutex_lock_nested+0x7d9/0x930
hardirqs last disabled at (22823276): [<ffffffff86e9521d>] apic_timer_interrupt+0x6d/0x80
softirqs last enabled at (22823172): [<ffffffff811ed969>] __do_softirq+0x4db/0x729
softirqs last disabled at (22823167): [<ffffffff811edfcf>] irq_exit+0x7d/0x15b
CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 3.19.0-05245-gbb33326-dirty #3
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5.1-0-g8936dbb-20141113_115728-nilsson.home.kraxel.org 04/01/2014
task: ffff88006cba8000 ti: ffff88006cbb0000 task.ti: ffff88006cbb0000
RIP: kasan_mem_to_shadow+0x1e/0x1f
Call Trace:
strcmp+0x28/0x70
get_node_by_name+0x66/0x99
gcov_event+0x4f/0x69e
gcov_enable_events+0x54/0x7b
gcov_fs_init+0xf8/0x134
do_one_initcall+0x1b2/0x288
kernel_init_freeable+0x467/0x580
kernel_init+0x15/0x18b
ret_from_fork+0x7c/0xb0
Kernel panic - not syncing: softlockup: hung tasks
Fix this by sticking cond_resched() in gcov_enable_events().
Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-17 09:04:08 -04:00
..
2015-04-15 09:00:47 -07:00
2015-02-19 12:39:03 -06:00
2015-04-15 09:00:47 -07:00
2015-04-17 09:04:08 -04:00
2015-04-11 11:17:28 +02:00
2015-04-13 23:57:20 +02:00
2015-04-13 10:27:28 -07:00
2015-04-10 12:01:59 +02:00
2015-04-11 22:24:41 -04:00
2015-03-20 08:31:01 -07:00
2015-04-14 13:58:48 -07:00
2015-04-03 15:15:52 +02:00
2015-04-15 16:35:25 -07:00
2015-04-11 22:27:55 -04:00
2014-10-09 22:26:04 -04:00
2014-12-13 12:42:53 -08:00
2014-09-23 16:37:53 -04:00
2014-12-30 10:45:47 -08:00
2015-01-23 00:23:58 -05:00
2015-02-11 20:07:47 -08:00
2015-02-17 15:27:47 -08:00
2015-04-15 16:35:22 -07:00
2015-04-15 16:35:25 -07:00
2015-02-12 18:54:12 -08:00
2015-03-09 15:43:00 +01:00
2015-04-14 13:36:04 -07:00
2015-04-14 16:49:03 -07:00
2015-04-15 16:35:22 -07:00
2015-04-12 21:03:31 +02:00
2015-04-12 20:58:24 +02:00
2014-11-19 15:25:26 -05:00
2015-04-17 09:04:07 -04:00
2014-10-21 23:44:20 +02:00
2015-02-24 08:41:07 +01:00
2015-04-15 16:35:22 -07:00
2015-04-15 16:35:22 -07:00
2014-10-29 11:18:18 -04:00
2014-10-14 02:18:16 +02:00
2015-01-14 15:07:32 +01:00
2015-02-17 14:34:51 -08:00
2014-12-10 17:41:17 -08:00
2015-02-13 21:21:42 -08:00
2014-10-09 22:25:51 -04:00
2015-04-15 16:35:22 -07:00
2015-04-14 10:49:03 -07:00
2015-01-06 11:04:29 -08:00
2014-12-04 14:34:54 -05:00
2015-02-13 21:21:38 -08:00
2014-12-22 15:40:48 +01:00
2015-01-20 11:38:31 +10:30
2014-12-16 15:53:03 -08:00
2015-04-17 09:04:06 -04:00
2015-02-13 21:21:38 -08:00
2015-04-17 09:04:06 -04:00
2015-01-17 10:02:23 +13:00
2015-04-15 16:35:23 -07:00
2015-04-15 16:35:22 -07:00
2015-02-17 14:34:55 -08:00
2015-04-17 09:04:06 -04:00
2014-10-15 07:48:18 +02:00
2015-03-11 13:20:25 -07:00
2015-02-09 15:24:03 -08:00
2014-12-13 12:42:48 -08:00
2015-04-15 16:35:22 -07:00
2015-04-17 09:04:07 -04:00
2014-12-10 17:41:10 -08:00
2015-04-17 09:04:08 -04:00
2015-01-18 01:03:45 -05:00
2014-09-16 13:41:06 -07:00
2014-12-05 17:19:27 -06:00
2014-12-17 12:31:40 -08:00
2014-12-17 12:31:40 -08:00
2014-12-04 14:34:47 -05:00
2015-04-14 16:49:17 -07:00
2015-04-06 11:16:04 -04:00