John Dias
9e4a31bcf8
perf: protect group_leader from races that cause ctx double-free
...
When moving a group_leader perf event from a software-context
to a hardware-context, there's a race in checking and
updating that context. The existing locking solution
doesn't work; note that it tries to grab a lock inside
the group_leader's context object, which you can only
get at by going through a pointer that should be protected
from these races. To avoid that problem, and to produce
a simple solution, we can just use a lock per group_leader
to protect all checks on the group_leader's context.
The new lock is grabbed and released when no context locks
are held.
Bug: 30955111
Bug: 31095224
Change-Id: If37124c100ca6f4aa962559fba3bd5dbbec8e052
Git-repo: https://android.googlesource.com/kernel/msm
Git-commit: 5b87e00be9ca28ea32cab49b92c0386e4a91f730
[dcagle@codeaurora.org: Slight merge conflict resolution]
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
2018-10-22 14:29:21 -07:00
..
2018-09-07 11:02:10 -07:00
2018-09-30 08:49:55 -07:00
2018-10-10 14:03:27 +02:00
2018-09-25 17:37:33 -07:00
2018-09-10 16:58:36 +01:00
2018-10-01 10:58:00 -07:00
2018-08-28 17:10:42 +05:30
2018-08-30 21:40:52 +05:30
2018-10-12 15:25:17 +01:00
2018-09-13 00:28:56 -07:00
2018-08-26 17:45:25 -07:00
2018-10-02 10:45:27 -07:00
2018-10-18 15:51:12 -07:00
2018-08-28 17:10:42 +05:30
2018-10-10 16:59:44 +08:00
2018-09-28 18:04:06 -07:00
2018-08-23 16:03:58 -07:00
2018-09-26 11:20:56 -07:00
2018-08-30 21:40:38 +05:30
2018-08-30 14:18:03 +01:00
2018-08-22 10:52:46 -07:00
2018-08-22 10:52:46 -07:00
2018-08-22 10:52:48 -07:00
2018-09-13 00:28:56 -07:00
2018-08-31 14:48:56 -06:00
2018-09-11 10:59:53 -06:00
2018-08-28 17:10:42 +05:30
2018-10-04 13:28:08 -07:00
2018-09-14 15:36:17 -07:00
2018-09-07 11:02:04 -07:00
2018-08-29 14:21:21 -07:00
2018-09-24 13:44:50 -07:00
2018-08-28 17:10:42 +05:30
2018-09-20 15:23:58 +02:00
2018-08-22 17:31:34 -07:00
2018-09-21 10:07:11 -07:00
2018-09-10 15:35:43 +08:00
2018-09-26 00:41:53 -07:00
2018-10-09 10:38:08 +08:00
2018-10-08 02:11:31 -07:00
2018-08-28 17:10:42 +05:30
2018-08-23 13:44:43 -07:00
2018-10-09 14:35:11 -07:00
2018-08-22 10:52:46 -07:00
2018-08-22 10:52:48 -07:00
2018-08-28 17:10:42 +05:30
2018-09-13 00:28:56 -07:00
2018-08-28 16:46:04 +05:30
2018-09-26 00:41:08 -07:00
2018-08-29 14:21:21 -07:00
2018-08-29 14:21:21 -07:00
2018-09-07 11:49:50 -07:00
2018-08-25 13:40:38 -07:00
2018-08-27 12:18:32 -07:00
2018-10-15 11:47:50 -07:00
2018-08-28 17:10:42 +05:30
2018-08-28 17:15:17 +05:30
2018-09-21 20:26:59 -06:00
2018-08-23 18:48:43 -07:00
2018-08-28 17:10:42 +05:30
2018-10-18 15:40:29 -07:00
2018-09-04 21:31:43 +02:00
2018-10-01 16:24:40 -07:00
2018-08-25 18:43:59 -07:00
2018-10-05 16:32:04 -07:00
2018-08-30 23:13:15 +02:00
2018-08-26 11:48:42 -07:00
2018-08-28 17:10:42 +05:30
2018-08-28 17:10:42 +05:30
2018-10-12 15:24:26 -07:00
2018-10-12 15:24:26 -07:00
2018-08-22 10:52:52 -07:00
2018-08-28 17:10:42 +05:30
2018-08-26 11:25:21 -07:00
2018-08-22 10:52:46 -07:00
2018-08-28 17:10:42 +05:30
2018-08-28 17:10:42 +05:30
2018-09-20 00:51:43 +02:00
2018-08-24 13:20:33 -07:00
2018-08-29 14:21:21 -07:00
2018-08-22 10:52:45 -07:00
2018-08-22 10:52:45 -07:00
2018-08-28 17:10:42 +05:30
2018-09-13 13:00:59 -07:00
2018-09-13 15:18:04 -10:00
2018-09-17 14:55:43 -07:00
2018-10-15 11:47:50 -07:00
2018-08-22 10:52:44 -07:00
2018-10-09 08:30:51 +02:00
2018-09-22 05:55:48 -07:00
2018-08-28 17:10:42 +05:30
2018-08-28 17:10:42 +05:30
2018-09-14 10:37:01 -07:00
2018-09-18 16:12:11 -07:00
2018-10-18 15:40:29 -07:00
2018-10-18 15:40:29 -07:00
2018-10-18 15:40:29 -07:00
2018-09-14 10:37:01 -07:00
2018-10-04 17:27:28 -07:00
2018-08-28 17:10:42 +05:30
2018-08-22 10:52:48 -07:00
2018-10-10 22:44:46 -07:00
2018-09-28 14:47:40 +02:00
2018-09-23 21:55:24 -07:00
2018-08-23 16:03:58 -07:00
2018-08-22 10:52:45 -07:00
2018-08-28 17:10:42 +05:30
2018-08-31 08:30:42 -04:00
2018-08-29 14:21:21 -07:00
2018-08-23 18:48:43 -07:00
2018-08-28 17:10:42 +05:30
2018-09-03 19:05:13 -07:00
2018-09-11 21:44:52 -05:00
2018-08-22 10:52:45 -07:00
2018-10-22 14:29:21 -07:00
2018-09-11 14:03:08 -06:00
2018-10-10 19:21:38 -07:00
2018-08-28 17:10:42 +05:30
2018-09-19 15:24:43 +08:00
2018-10-18 15:51:12 -07:00
2018-08-28 17:10:42 +05:30
2018-10-18 15:40:29 -07:00
2018-10-18 15:40:29 -07:00
2018-10-02 14:38:02 -07:00
2018-09-27 20:02:17 -07:00
2018-08-22 12:34:08 -07:00
2018-09-12 19:46:21 -07:00
2018-09-18 19:48:08 -07:00
2018-10-15 11:47:50 -07:00
2018-08-23 18:48:44 -07:00
2018-08-28 17:10:42 +05:30
2018-08-28 17:10:42 +05:30
2018-09-03 13:26:44 +02:00
2018-09-25 16:17:20 +08:00
2018-09-05 11:23:21 -04:00
2018-09-12 14:58:47 -07:00
2018-08-23 18:48:44 -07:00
2018-08-28 17:10:42 +05:30
2018-09-13 17:58:30 +02:00
2018-10-04 22:23:15 -07:00
2018-10-16 10:35:44 -07:00
2018-09-13 15:18:04 -10:00
2018-08-28 17:10:42 +05:30