security: remove unused parameter from security_task_setscheduler()
All security modules shouldn't change sched_param parameter of security_task_setscheduler(). This is not only meaningless, but also make a harmful result if caller pass a static variable. This patch remove policy and sched_param parameter from security_task_setscheduler() becuase none of security module is using it. Cc: James Morris <jmorris@namei.org> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:

committed by
James Morris

parent
9b3056cca0
commit
b0ae198113
@@ -74,7 +74,7 @@ extern int cap_file_mmap(struct file *file, unsigned long reqprot,
|
||||
extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags);
|
||||
extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3,
|
||||
unsigned long arg4, unsigned long arg5);
|
||||
extern int cap_task_setscheduler(struct task_struct *p, int policy, struct sched_param *lp);
|
||||
extern int cap_task_setscheduler(struct task_struct *p);
|
||||
extern int cap_task_setioprio(struct task_struct *p, int ioprio);
|
||||
extern int cap_task_setnice(struct task_struct *p, int nice);
|
||||
extern int cap_syslog(int type, bool from_file);
|
||||
@@ -1501,8 +1501,7 @@ struct security_operations {
|
||||
int (*task_getioprio) (struct task_struct *p);
|
||||
int (*task_setrlimit) (struct task_struct *p, unsigned int resource,
|
||||
struct rlimit *new_rlim);
|
||||
int (*task_setscheduler) (struct task_struct *p, int policy,
|
||||
struct sched_param *lp);
|
||||
int (*task_setscheduler) (struct task_struct *p);
|
||||
int (*task_getscheduler) (struct task_struct *p);
|
||||
int (*task_movememory) (struct task_struct *p);
|
||||
int (*task_kill) (struct task_struct *p,
|
||||
@@ -1752,8 +1751,7 @@ int security_task_setioprio(struct task_struct *p, int ioprio);
|
||||
int security_task_getioprio(struct task_struct *p);
|
||||
int security_task_setrlimit(struct task_struct *p, unsigned int resource,
|
||||
struct rlimit *new_rlim);
|
||||
int security_task_setscheduler(struct task_struct *p,
|
||||
int policy, struct sched_param *lp);
|
||||
int security_task_setscheduler(struct task_struct *p);
|
||||
int security_task_getscheduler(struct task_struct *p);
|
||||
int security_task_movememory(struct task_struct *p);
|
||||
int security_task_kill(struct task_struct *p, struct siginfo *info,
|
||||
@@ -2320,11 +2318,9 @@ static inline int security_task_setrlimit(struct task_struct *p,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int security_task_setscheduler(struct task_struct *p,
|
||||
int policy,
|
||||
struct sched_param *lp)
|
||||
static inline int security_task_setscheduler(struct task_struct *p)
|
||||
{
|
||||
return cap_task_setscheduler(p, policy, lp);
|
||||
return cap_task_setscheduler(p);
|
||||
}
|
||||
|
||||
static inline int security_task_getscheduler(struct task_struct *p)
|
||||
|
Reference in New Issue
Block a user