Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AndroidKernelMSM
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
AndroidKernelMSM
Commits
e8c64bc6
Commit
e8c64bc6
authored
Aug 18, 2014
by
Robert Sesek
Committed by
Iliyan Malchev
Nov 1, 2014
Browse files
Options
Downloads
Patches
Plain Diff
seccomp: Use atomic operations that are present in kernel 3.4.
Signed-off-by:
Robert Sesek
<
rsesek@google.com
>
parent
6756f10b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
kernel/seccomp.c
+3
-3
3 additions, 3 deletions
kernel/seccomp.c
with
3 additions
and
3 deletions
kernel/seccomp.c
+
3
−
3
View file @
e8c64bc6
...
@@ -245,7 +245,7 @@ static inline void seccomp_assign_mode(struct task_struct *task,
...
@@ -245,7 +245,7 @@ static inline void seccomp_assign_mode(struct task_struct *task,
* Make sure TIF_SECCOMP cannot be set before the mode (and
* Make sure TIF_SECCOMP cannot be set before the mode (and
* filter) is set.
* filter) is set.
*/
*/
smp_mb
__before_atomic
();
smp_mb
();
set_tsk_thread_flag
(
task
,
TIF_SECCOMP
);
set_tsk_thread_flag
(
task
,
TIF_SECCOMP
);
}
}
...
@@ -335,8 +335,8 @@ static inline void seccomp_sync_threads(void)
...
@@ -335,8 +335,8 @@ static inline void seccomp_sync_threads(void)
* allows a put before the assignment.)
* allows a put before the assignment.)
*/
*/
put_seccomp_filter
(
thread
);
put_seccomp_filter
(
thread
);
smp_
store_release
(
&
thread
->
seccomp
.
filter
,
smp_
mb
();
caller
->
seccomp
.
filter
)
;
ACCESS_ONCE
(
thread
->
seccomp
.
filter
)
=
caller
->
seccomp
.
filter
;
/*
/*
* Opt the other thread into seccomp if needed.
* Opt the other thread into seccomp if needed.
* As threads are considered to be trust-realm
* As threads are considered to be trust-realm
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment