mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
ipc: Directly call the security hook in ipc_ops.associate
After the last round of cleanups the shm, sem, and msg associate operations just became trivial wrappers around the appropriate security method. Simplify things further by just calling the security method directly. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
This commit is contained in:
10
ipc/sem.c
10
ipc/sem.c
@@ -564,14 +564,6 @@ static int newary(struct ipc_namespace *ns, struct ipc_params *params)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Called with sem_ids.rwsem and ipcp locked.
|
||||
*/
|
||||
static inline int sem_security(struct kern_ipc_perm *ipcp, int semflg)
|
||||
{
|
||||
return security_sem_associate(ipcp, semflg);
|
||||
}
|
||||
|
||||
/*
|
||||
* Called with sem_ids.rwsem and ipcp locked.
|
||||
*/
|
||||
@@ -592,7 +584,7 @@ SYSCALL_DEFINE3(semget, key_t, key, int, nsems, int, semflg)
|
||||
struct ipc_namespace *ns;
|
||||
static const struct ipc_ops sem_ops = {
|
||||
.getnew = newary,
|
||||
.associate = sem_security,
|
||||
.associate = security_sem_associate,
|
||||
.more_checks = sem_more_checks,
|
||||
};
|
||||
struct ipc_params sem_params;
|
||||
|
Reference in New Issue
Block a user