Andrey Vagin
20afc60f89
x86, perf: Check that current->mm is alive before getting user callchain
An event may occur when an mm is already released.
I added an event in dequeue_entity() and caught a panic with
the following backtrace:
[ 434.421110] BUG: unable to handle kernel NULL pointer dereference at 0000000000000050
[ 434.421258] IP: [<ffffffff810464ac>] __get_user_pages_fast+0x9c/0x120
...
[ 434.421258] Call Trace:
[ 434.421258] [<ffffffff8101ae81>] copy_from_user_nmi+0x51/0xf0
[ 434.421258] [<ffffffff8109a0d5>] ? sched_clock_local+0x25/0x90
[ 434.421258] [<ffffffff8101b048>] perf_callchain_user+0x128/0x170
[ 434.421258] [<ffffffff811154cd>] ? __perf_event_header__init_id+0xed/0x100
[ 434.421258] [<ffffffff81116690>] perf_prepare_sample+0x200/0x280
[ 434.421258] [<ffffffff81118da8>] __perf_event_overflow+0x1b8/0x290
[ 434.421258] [<ffffffff81065240>] ? tg_shares_up+0x0/0x670
[ 434.421258] [<ffffffff8104fe1a>] ? walk_tg_tree+0x6a/0xb0
[ 434.421258] [<ffffffff81118f44>] perf_swevent_overflow+0xc4/0xf0
[ 434.421258] [<ffffffff81119150>] do_perf_sw_event+0x1e0/0x250
[ 434.421258] [<ffffffff81119204>] perf_tp_event+0x44/0x70
[ 434.421258] [<ffffffff8105701f>] ftrace_profile_sched_block+0xdf/0x110
[ 434.421258] [<ffffffff8106121d>] dequeue_entity+0x2ad/0x2d0
[ 434.421258] [<ffffffff810614ec>] dequeue_task_fair+0x1c/0x60
[ 434.421258] [<ffffffff8105818a>] dequeue_task+0x9a/0xb0
[ 434.421258] [<ffffffff810581e2>] deactivate_task+0x42/0xe0
[ 434.421258] [<ffffffff814bc019>] thread_return+0x191/0x808
[ 434.421258] [<ffffffff81098a44>] ? switch_task_namespaces+0x24/0x60
[ 434.421258] [<ffffffff8106f4c4>] do_exit+0x464/0x910
[ 434.421258] [<ffffffff8106f9c8>] do_group_exit+0x58/0xd0
[ 434.421258] [<ffffffff8106fa57>] sys_exit_group+0x17/0x20
[ 434.421258] [<ffffffff8100b202>] system_call_fastpath+0x16/0x1b
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: stable@kernel.org
Link: http://lkml.kernel.org/r/1314693156-24131-1-git-send-email-avagin@openvz.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-08-31 15:56:31 +02:00
..
2011-08-03 19:06:36 -04:00
2011-08-05 23:48:34 +02:00
2011-08-31 15:56:31 +02:00
2011-07-14 17:57:05 -07:00
2011-07-26 16:49:47 -07:00
2011-03-31 08:51:38 +02:00
2011-07-23 10:34:47 -07:00
2011-04-18 10:31:38 -07:00
2011-07-01 10:37:15 +02:00
2011-07-22 14:39:48 +09:30
2011-02-10 13:31:37 +01:00
2011-02-25 16:37:32 -08:00
2010-03-30 22:02:32 +09:00
2011-03-09 16:36:41 +01:00
2010-11-17 08:59:32 -08:00
2011-03-23 19:47:19 -07:00
2011-03-23 19:47:19 -07:00
2010-07-21 11:33:27 -07:00
2011-07-22 14:54:02 -07:00
2011-03-18 10:51:42 +01:00
2011-07-02 18:06:36 +02:00
2011-05-19 18:24:11 -07:00
2011-03-23 19:47:19 -07:00
2010-12-06 20:52:04 +01:00
2011-03-16 14:03:32 +01:00
2011-08-25 13:27:14 -07:00
2011-08-12 20:46:24 -07:00
2011-05-25 19:56:26 -04:00
2011-05-19 18:08:06 -07:00
2011-03-19 11:58:19 -07:00
2011-03-15 20:01:36 -07:00
2011-02-17 21:02:43 -08:00
2010-08-27 11:12:29 -07:00
2011-07-22 17:05:15 -07:00
2010-12-30 12:20:28 +01:00
2011-07-21 14:10:00 +02:00
2011-03-23 22:15:54 +01:00
2011-07-01 10:37:14 +02:00
2011-07-26 16:49:47 -07:00
2010-03-03 11:25:58 +01:00
2011-02-17 14:59:22 +01:00
2011-03-18 10:39:30 +01:00
2010-10-18 19:58:50 +02:00
2011-05-19 14:51:08 +02:00
2011-07-26 16:49:47 -07:00
2011-04-18 16:40:21 -07:00
2010-10-15 15:53:27 +02:00
2011-07-01 11:06:38 +02:00
2011-05-11 13:21:23 +02:00
2011-07-24 11:49:36 +03:00
2011-07-24 11:49:36 +03:00
2010-03-30 22:02:32 +09:00
2010-09-22 15:36:49 -07:00
2011-08-12 20:46:24 -07:00
2011-03-18 10:39:30 +01:00
2011-06-16 17:23:54 +02:00
2011-03-29 11:12:04 +02:00
2010-12-27 14:33:30 +01:00
2010-11-18 13:41:35 +01:00
2011-07-24 22:06:04 +09:30
2011-05-20 13:40:59 +02:00
2010-11-17 08:59:32 -08:00
2011-08-12 20:46:24 -07:00
2011-06-10 14:55:36 +02:00
2011-05-10 15:43:32 -07:00
2011-05-10 10:21:35 +02:00
2010-03-30 22:02:32 +09:00
2010-08-26 15:13:37 -07:00
2011-06-10 14:55:36 +02:00
2011-08-03 19:06:37 -04:00
2011-08-03 19:06:37 -04:00
2011-08-03 19:06:36 -04:00
2011-07-01 11:06:38 +02:00
2010-11-28 09:33:20 +01:00
2011-07-21 10:26:00 +02:00
2011-05-02 14:44:46 -07:00
2010-11-12 00:45:41 +01:00
2011-07-21 11:47:17 -07:00
2011-07-21 11:19:28 +02:00
2011-07-21 11:19:28 +02:00
2010-12-17 10:01:30 -08:00
2011-02-23 22:27:55 +01:00
2011-01-28 14:54:09 +01:00
2011-05-26 13:51:35 +02:00
2011-07-14 21:46:20 -07:00
2011-04-14 08:52:32 +02:00
2011-07-22 17:02:38 -07:00
2011-06-14 22:48:51 -04:00
2011-08-04 16:13:49 -07:00
2010-09-03 08:16:02 +02:00
2010-03-12 15:52:32 -08:00
2011-08-26 15:09:58 -07:00
2011-06-21 19:17:20 -07:00
2011-05-21 19:10:33 +02:00
2011-06-09 15:01:37 +02:00
2011-03-18 10:39:30 +01:00
2011-02-17 21:02:43 -08:00
2011-02-18 15:50:36 -08:00
2011-02-17 21:02:43 -08:00
2011-08-12 20:46:24 -07:00
2011-07-23 10:38:21 -07:00
2011-03-18 10:39:30 +01:00
2011-01-13 17:32:41 -08:00
2011-08-10 19:26:46 -05:00
2011-08-10 19:26:46 -05:00
2011-08-10 19:26:46 -05:00
2011-08-04 16:13:53 -07:00
2011-05-19 18:08:06 -07:00
2011-01-25 16:58:39 -08:00
2011-03-18 10:39:30 +01:00