gaming_control: Remove task kill check
In case task_struct was locked out, we can't check its cmdline If we do, we'll get a soft lockup Background and top-app check is enough Signed-off-by: Diep Quynh <remilia.1505@gmail.com>
This commit is contained in:
parent
609163c324
commit
75f9b626ee
3 changed files with 1 additions and 13 deletions
|
@ -27,7 +27,6 @@
|
|||
#define GAMING_CONTROL_VERSION "0.2"
|
||||
|
||||
#define TASK_STARTED 1
|
||||
#define TASK_KILLED 0
|
||||
|
||||
char games_list[GAME_LIST_LENGTH] = {0};
|
||||
int gaming_mode;
|
||||
|
@ -86,10 +85,6 @@ void game_option(struct task_struct *tsk, enum game_opts opts)
|
|||
case GAME_PAUSE:
|
||||
gaming_mode = 0;
|
||||
break;
|
||||
case GAME_KILLED:
|
||||
tsk->app_state = TASK_KILLED;
|
||||
gaming_mode = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -21,8 +21,7 @@
|
|||
enum game_opts {
|
||||
GAME_START,
|
||||
GAME_RUNNING,
|
||||
GAME_PAUSE,
|
||||
GAME_KILLED
|
||||
GAME_PAUSE
|
||||
};
|
||||
|
||||
#ifdef CONFIG_GAMING_CONTROL
|
||||
|
|
|
@ -40,9 +40,6 @@
|
|||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/signal.h>
|
||||
|
||||
/* Gaming control */
|
||||
#include <linux/gaming_control.h>
|
||||
|
||||
#include <asm/param.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/unistd.h>
|
||||
|
@ -1208,9 +1205,6 @@ int do_send_sig_info(int sig, struct siginfo *info, struct task_struct *p,
|
|||
unsigned long flags;
|
||||
int ret = -ESRCH;
|
||||
|
||||
if ((sig == SIGKILL || sig == SIGTERM || sig == SIGABRT || sig == SIGQUIT))
|
||||
game_option(p, GAME_KILLED);
|
||||
|
||||
if (lock_task_sighand(p, &flags)) {
|
||||
ret = send_signal(sig, info, p, group);
|
||||
unlock_task_sighand(p, &flags);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue