Skip to content

Commit d3b5c03

Browse files
committed
Make proctrace_send_event call proctrace_notify
1 parent a362ec8 commit d3b5c03

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

include/linux/ptrace.h

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -194,29 +194,10 @@ static inline bool proctrace_event_enabled(struct task_struct *task, int event)
194194
return 0;
195195
}
196196

197-
static inline bool proctrace_send_event(int event, unsigned int message)
197+
static inline void proctrace_send_event(int event, unsigned int message)
198198
{
199-
struct list_head *p;
200-
struct sig_wait_queue_struct *sig_wait;
201-
list_for_each(p, &current->sig_wait_list) {
202-
sig_wait = list_entry(p, struct sig_wait_queue_struct, list);
203-
if (sig_wait->sigmask & (1ULL << event)) {
204-
current->ptrace_message = message;
205-
wake_up(&sig_wait->wait_queue);
206-
207-
// other guys do that in copy_process
208-
if (event == PROCTRACE_EXIT) {
209-
set_current_state(TASK_INTERRUPTIBLE);
210-
schedule();
211-
set_current_state(TASK_RUNNING);
212-
}
213-
if (event == PROCTRACE_EXEC) {
214-
send_sig_info(SIGSTOP, SEND_SIG_FORCED, current);
215-
}
216-
}
217-
}
218-
219-
return 0;
199+
current->ptrace_message = message;
200+
proctrace_notify(event);
220201
}
221202

222203
/**

0 commit comments

Comments
 (0)