Commit 19981f8f authored by Dennis Rassmann's avatar Dennis Rassmann

Merge remote-tracking branch 'origin/android-msm-mako-3.4-lollipop-mr1.1' into exp

Conflicts:
	build.config
parents 67779e1b dffc2588
ARCH=arm
BRANCH=android-msm-mako-3.4-lmp-mr1
BRANCH=android-msm-mako-3.4-clean-wip
CROSS_COMPILE=arm-eabi-
DEFCONFIG=mako_defconfig
EXTRA_CMDS=''
......
......@@ -137,12 +137,6 @@ struct pid_entry {
static int proc_fd_permission(struct inode *inode, int mask);
/* ANDROID is for special files in /proc. */
#define ANDROID(NAME, MODE, OTYPE) \
NOD(NAME, (S_IFREG|(MODE)), \
&proc_##OTYPE##_inode_operations, \
&proc_##OTYPE##_operations, {})
/*
* Count the number of hardlinks for the pid_entry table, excluding the .
* and .. links.
......@@ -975,35 +969,6 @@ out:
return err < 0 ? err : count;
}
static int oom_adjust_permission(struct inode *inode, int mask)
{
uid_t uid;
struct task_struct *p;
p = get_proc_task(inode);
if(p) {
uid = task_uid(p);
put_task_struct(p);
}
/*
* System Server (uid == 1000) is granted access to oom_adj of all
* android applications (uid > 10000) as and services (uid >= 1000)
*/
if (p && (current_fsuid() == 1000) && (uid >= 1000)) {
if (inode->i_mode >> 6 & mask) {
return 0;
}
}
/* Fall back to default. */
return generic_permission(inode, mask);
}
static const struct inode_operations proc_oom_adjust_inode_operations = {
.permission = oom_adjust_permission,
};
static const struct file_operations proc_oom_adjust_operations = {
.read = oom_adjust_read,
.write = oom_adjust_write,
......@@ -3043,8 +3008,8 @@ static const struct pid_entry tgid_base_stuff[] = {
REG("cgroup", S_IRUGO, proc_cgroup_operations),
#endif
INF("oom_score", S_IRUGO, proc_oom_score),
ANDROID("oom_adj",S_IRUGO|S_IWUSR, oom_adjust),
REG("oom_score_adj", S_IRUGO|S_IWUSR, proc_oom_score_adj_operations),
REG("oom_adj", S_IRUSR, proc_oom_adjust_operations),
REG("oom_score_adj", S_IRUSR, proc_oom_score_adj_operations),
#ifdef CONFIG_AUDITSYSCALL
REG("loginuid", S_IWUSR|S_IRUGO, proc_loginuid_operations),
REG("sessionid", S_IRUGO, proc_sessionid_operations),
......@@ -3401,8 +3366,8 @@ static const struct pid_entry tid_base_stuff[] = {
REG("cgroup", S_IRUGO, proc_cgroup_operations),
#endif
INF("oom_score", S_IRUGO, proc_oom_score),
REG("oom_adj", S_IRUGO|S_IWUSR, proc_oom_adjust_operations),
REG("oom_score_adj", S_IRUGO|S_IWUSR, proc_oom_score_adj_operations),
REG("oom_adj", S_IRUSR, proc_oom_adjust_operations),
REG("oom_score_adj", S_IRUSR, proc_oom_score_adj_operations),
#ifdef CONFIG_AUDITSYSCALL
REG("loginuid", S_IWUSR|S_IRUGO, proc_loginuid_operations),
REG("sessionid", S_IRUGO, proc_sessionid_operations),
......
......@@ -153,6 +153,7 @@ void ping_unhash(struct sock *sk)
if (sk_hashed(sk)) {
write_lock_bh(&ping_table.lock);
hlist_nulls_del(&sk->sk_nulls_node);
sk_nulls_node_init(&sk->sk_nulls_node);
sock_put(sk);
isk->inet_num = 0;
isk->inet_sport = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment