Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
6fb8f43c
Commit
6fb8f43c
authored
Feb 18, 2021
by
Jens Axboe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: treat PF_IO_WORKER like PF_KTHREAD for ptrace/signals
Signed-off-by:
Jens Axboe
<
axboe@kernel.dk
>
parent
4727dc20
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
kernel/ptrace.c
kernel/ptrace.c
+1
-1
kernel/signal.c
kernel/signal.c
+2
-2
No files found.
kernel/ptrace.c
View file @
6fb8f43c
...
...
@@ -375,7 +375,7 @@ static int ptrace_attach(struct task_struct *task, long request,
audit_ptrace
(
task
);
retval
=
-
EPERM
;
if
(
unlikely
(
task
->
flags
&
PF_KTHREAD
))
if
(
unlikely
(
task
->
flags
&
(
PF_KTHREAD
|
PF_IO_WORKER
)
))
goto
out
;
if
(
same_thread_group
(
task
,
current
))
goto
out
;
...
...
kernel/signal.c
View file @
6fb8f43c
...
...
@@ -91,7 +91,7 @@ static bool sig_task_ignored(struct task_struct *t, int sig, bool force)
return
true
;
/* Only allow kernel generated signals to this kthread */
if
(
unlikely
((
t
->
flags
&
PF_KTHREAD
)
&&
if
(
unlikely
((
t
->
flags
&
(
PF_KTHREAD
|
PF_IO_WORKER
)
)
&&
(
handler
==
SIG_KTHREAD_KERNEL
)
&&
!
force
))
return
true
;
...
...
@@ -1096,7 +1096,7 @@ static int __send_signal(int sig, struct kernel_siginfo *info, struct task_struc
/*
* Skip useless siginfo allocation for SIGKILL and kernel threads.
*/
if
((
sig
==
SIGKILL
)
||
(
t
->
flags
&
PF_KTHREAD
))
if
((
sig
==
SIGKILL
)
||
(
t
->
flags
&
(
PF_KTHREAD
|
PF_IO_WORKER
)
))
goto
out_set
;
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment