mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Merge branch 'master' into next
This commit is contained in:
commit
d254117099
6181 changed files with 672645 additions and 214147 deletions
|
|
@ -948,7 +948,6 @@ changed:
|
|||
return commit_creds(new);
|
||||
|
||||
no_change:
|
||||
error = 0;
|
||||
error:
|
||||
abort_creds(new);
|
||||
return error;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include <linux/uaccess.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/rcupdate.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
#define ACC_MKNOD 1
|
||||
#define ACC_READ 2
|
||||
|
|
@ -21,9 +22,11 @@
|
|||
#define DEV_CHAR 2
|
||||
#define DEV_ALL 4 /* this represents all devices */
|
||||
|
||||
static DEFINE_MUTEX(devcgroup_mutex);
|
||||
|
||||
/*
|
||||
* whitelist locking rules:
|
||||
* hold cgroup_lock() for update/read.
|
||||
* hold devcgroup_mutex for update/read.
|
||||
* hold rcu_read_lock() for read.
|
||||
*/
|
||||
|
||||
|
|
@ -67,7 +70,7 @@ static int devcgroup_can_attach(struct cgroup_subsys *ss,
|
|||
}
|
||||
|
||||
/*
|
||||
* called under cgroup_lock()
|
||||
* called under devcgroup_mutex
|
||||
*/
|
||||
static int dev_whitelist_copy(struct list_head *dest, struct list_head *orig)
|
||||
{
|
||||
|
|
@ -92,7 +95,7 @@ free_and_exit:
|
|||
|
||||
/* Stupid prototype - don't bother combining existing entries */
|
||||
/*
|
||||
* called under cgroup_lock()
|
||||
* called under devcgroup_mutex
|
||||
*/
|
||||
static int dev_whitelist_add(struct dev_cgroup *dev_cgroup,
|
||||
struct dev_whitelist_item *wh)
|
||||
|
|
@ -130,7 +133,7 @@ static void whitelist_item_free(struct rcu_head *rcu)
|
|||
}
|
||||
|
||||
/*
|
||||
* called under cgroup_lock()
|
||||
* called under devcgroup_mutex
|
||||
*/
|
||||
static void dev_whitelist_rm(struct dev_cgroup *dev_cgroup,
|
||||
struct dev_whitelist_item *wh)
|
||||
|
|
@ -185,8 +188,10 @@ static struct cgroup_subsys_state *devcgroup_create(struct cgroup_subsys *ss,
|
|||
list_add(&wh->list, &dev_cgroup->whitelist);
|
||||
} else {
|
||||
parent_dev_cgroup = cgroup_to_devcgroup(parent_cgroup);
|
||||
mutex_lock(&devcgroup_mutex);
|
||||
ret = dev_whitelist_copy(&dev_cgroup->whitelist,
|
||||
&parent_dev_cgroup->whitelist);
|
||||
mutex_unlock(&devcgroup_mutex);
|
||||
if (ret) {
|
||||
kfree(dev_cgroup);
|
||||
return ERR_PTR(ret);
|
||||
|
|
@ -273,7 +278,7 @@ static int devcgroup_seq_read(struct cgroup *cgroup, struct cftype *cft,
|
|||
* does the access granted to dev_cgroup c contain the access
|
||||
* requested in whitelist item refwh.
|
||||
* return 1 if yes, 0 if no.
|
||||
* call with c->lock held
|
||||
* call with devcgroup_mutex held
|
||||
*/
|
||||
static int may_access_whitelist(struct dev_cgroup *c,
|
||||
struct dev_whitelist_item *refwh)
|
||||
|
|
@ -426,11 +431,11 @@ static int devcgroup_access_write(struct cgroup *cgrp, struct cftype *cft,
|
|||
const char *buffer)
|
||||
{
|
||||
int retval;
|
||||
if (!cgroup_lock_live_group(cgrp))
|
||||
return -ENODEV;
|
||||
|
||||
mutex_lock(&devcgroup_mutex);
|
||||
retval = devcgroup_update_access(cgroup_to_devcgroup(cgrp),
|
||||
cft->private, buffer);
|
||||
cgroup_unlock();
|
||||
mutex_unlock(&devcgroup_mutex);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -311,7 +311,8 @@ static int construct_alloc_key(struct key_type *type,
|
|||
|
||||
set_bit(KEY_FLAG_USER_CONSTRUCT, &key->flags);
|
||||
|
||||
down_write(&dest_keyring->sem);
|
||||
if (dest_keyring)
|
||||
down_write(&dest_keyring->sem);
|
||||
|
||||
/* attach the key to the destination keyring under lock, but we do need
|
||||
* to do another check just in case someone beat us to it whilst we
|
||||
|
|
@ -322,10 +323,12 @@ static int construct_alloc_key(struct key_type *type,
|
|||
if (!IS_ERR(key_ref))
|
||||
goto key_already_present;
|
||||
|
||||
__key_link(dest_keyring, key);
|
||||
if (dest_keyring)
|
||||
__key_link(dest_keyring, key);
|
||||
|
||||
mutex_unlock(&key_construction_mutex);
|
||||
up_write(&dest_keyring->sem);
|
||||
if (dest_keyring)
|
||||
up_write(&dest_keyring->sem);
|
||||
mutex_unlock(&user->cons_lock);
|
||||
*_key = key;
|
||||
kleave(" = 0 [%d]", key_serial(key));
|
||||
|
|
|
|||
|
|
@ -445,6 +445,7 @@ int security_inode_create(struct inode *dir, struct dentry *dentry, int mode)
|
|||
return 0;
|
||||
return security_ops->inode_create(dir, dentry, mode);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(security_inode_create);
|
||||
|
||||
int security_inode_link(struct dentry *old_dentry, struct inode *dir,
|
||||
struct dentry *new_dentry)
|
||||
|
|
@ -475,6 +476,7 @@ int security_inode_mkdir(struct inode *dir, struct dentry *dentry, int mode)
|
|||
return 0;
|
||||
return security_ops->inode_mkdir(dir, dentry, mode);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(security_inode_mkdir);
|
||||
|
||||
int security_inode_rmdir(struct inode *dir, struct dentry *dentry)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3145,7 +3145,7 @@ static int selinux_file_send_sigiotask(struct task_struct *tsk,
|
|||
struct fown_struct *fown, int signum)
|
||||
{
|
||||
struct file *file;
|
||||
u32 sid = current_sid();
|
||||
u32 sid = task_sid(tsk);
|
||||
u32 perm;
|
||||
struct file_security_struct *fsec;
|
||||
|
||||
|
|
|
|||
|
|
@ -675,8 +675,12 @@ static int smack_inode_setxattr(struct dentry *dentry, const char *name,
|
|||
strcmp(name, XATTR_NAME_SMACKIPOUT) == 0) {
|
||||
if (!capable(CAP_MAC_ADMIN))
|
||||
rc = -EPERM;
|
||||
/* a label cannot be void and cannot begin with '-' */
|
||||
if (size == 0 || (size > 0 && ((char *)value)[0] == '-'))
|
||||
/*
|
||||
* check label validity here so import wont fail on
|
||||
* post_setxattr
|
||||
*/
|
||||
if (size == 0 || size >= SMK_LABELLEN ||
|
||||
smk_import(value, size) == NULL)
|
||||
rc = -EINVAL;
|
||||
} else
|
||||
rc = cap_inode_setxattr(dentry, name, value, size, flags);
|
||||
|
|
@ -713,9 +717,6 @@ static void smack_inode_post_setxattr(struct dentry *dentry, const char *name,
|
|||
if (strcmp(name, XATTR_NAME_SMACK))
|
||||
return;
|
||||
|
||||
if (size >= SMK_LABELLEN)
|
||||
return;
|
||||
|
||||
isp = dentry->d_inode->i_security;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* Copyright (C) 2005-2009 NTT DATA CORPORATION
|
||||
*
|
||||
* Version: 2.2.0-pre 2009/02/01
|
||||
* Version: 2.2.0 2009/04/01
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
@ -1773,7 +1773,7 @@ void tomoyo_load_policy(const char *filename)
|
|||
envp[2] = NULL;
|
||||
call_usermodehelper(argv[0], argv, envp, 1);
|
||||
|
||||
printk(KERN_INFO "TOMOYO: 2.2.0-pre 2009/02/01\n");
|
||||
printk(KERN_INFO "TOMOYO: 2.2.0 2009/04/01\n");
|
||||
printk(KERN_INFO "Mandatory Access Control activated.\n");
|
||||
tomoyo_policy_loaded = true;
|
||||
{ /* Check all profiles currently assigned to domains are defined. */
|
||||
|
|
@ -1800,7 +1800,7 @@ void tomoyo_load_policy(const char *filename)
|
|||
static int tomoyo_read_version(struct tomoyo_io_buffer *head)
|
||||
{
|
||||
if (!head->read_eof) {
|
||||
tomoyo_io_printf(head, "2.2.0-pre");
|
||||
tomoyo_io_printf(head, "2.2.0");
|
||||
head->read_eof = true;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* Copyright (C) 2005-2009 NTT DATA CORPORATION
|
||||
*
|
||||
* Version: 2.2.0-pre 2009/02/01
|
||||
* Version: 2.2.0 2009/04/01
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* Copyright (C) 2005-2009 NTT DATA CORPORATION
|
||||
*
|
||||
* Version: 2.2.0-pre 2009/02/01
|
||||
* Version: 2.2.0 2009/04/01
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* Copyright (C) 2005-2009 NTT DATA CORPORATION
|
||||
*
|
||||
* Version: 2.2.0-pre 2009/02/01
|
||||
* Version: 2.2.0 2009/04/01
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -5,13 +5,14 @@
|
|||
*
|
||||
* Copyright (C) 2005-2009 NTT DATA CORPORATION
|
||||
*
|
||||
* Version: 2.2.0-pre 2009/02/01
|
||||
* Version: 2.2.0 2009/04/01
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/mount.h>
|
||||
#include <linux/mnt_namespace.h>
|
||||
#include <linux/fs_struct.h>
|
||||
#include "common.h"
|
||||
#include "realpath.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* Copyright (C) 2005-2009 NTT DATA CORPORATION
|
||||
*
|
||||
* Version: 2.2.0-pre 2009/02/01
|
||||
* Version: 2.2.0 2009/04/01
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* Copyright (C) 2005-2009 NTT DATA CORPORATION
|
||||
*
|
||||
* Version: 2.2.0-pre 2009/02/01
|
||||
* Version: 2.2.0 2009/04/01
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* Copyright (C) 2005-2009 NTT DATA CORPORATION
|
||||
*
|
||||
* Version: 2.2.0-pre 2009/02/01
|
||||
* Version: 2.2.0 2009/04/01
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue