summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorchunx <chunx@nvidia.com>2013-07-05 11:42:05 +0800
committerGabby Lee <galee@nvidia.com>2013-07-30 03:20:49 -0700
commit5dcfe4f561bd8d1767e0938dfd7565b2b7718478 (patch)
tree4b6e7776a488e4f132a8bd8a105b7111d6ca9ad8 /include/linux
parent61129a28e27bd4c5f794aa9af6903fd8ba68c746 (diff)
arm: tegra: tegratab: active-standby: add cmdline informatioin
into /proc/net/{tcp udp tcp6 udp6} files. Get process's cmdline from a sock's corresponding inode pointer, so that cmdline can't be used by Android active-standby app to find the corresponding package name. Bug 1185001 Change-Id: Idc8651e4bb85b8a152dfade9689a719f7d72687d Signed-off-by: Chun Xu <chunx@nvidia.com> Reviewed-on: http://git-master/r/253458 Tested-by: Jiukai Ma <jiukaim@nvidia.com> Reviewed-by: Gabby Lee <galee@nvidia.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/eventpoll.h5
-rw-r--r--include/linux/poll.h5
-rw-r--r--include/linux/sched.h13
3 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h
index 6f8be328770a..9378240bad9f 100644
--- a/include/linux/eventpoll.h
+++ b/include/linux/eventpoll.h
@@ -9,6 +9,8 @@
*
* Davide Libenzi <davidel@xmailserver.org>
*
+ * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
+ *
*/
#ifndef _LINUX_EVENTPOLL_H
@@ -108,6 +110,9 @@ static inline void eventpoll_release(struct file *file)
eventpoll_release_file(file);
}
+int ep_poll_callback(wait_queue_t *wait, unsigned mode, int sync, void *key);
+struct task_struct *get_epoll_file_task(struct file *file);
+
#else
static inline void eventpoll_init_file(struct file *file) {}
diff --git a/include/linux/poll.h b/include/linux/poll.h
index 48fe8bc398d1..6769d98f2aeb 100644
--- a/include/linux/poll.h
+++ b/include/linux/poll.h
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
+ */
+
#ifndef _LINUX_POLL_H
#define _LINUX_POLL_H
@@ -96,6 +100,7 @@ struct poll_wqueues {
extern void poll_initwait(struct poll_wqueues *pwq);
extern void poll_freewait(struct poll_wqueues *pwq);
+extern int pollwake(wait_queue_t *wait, unsigned mode, int sync, void *key);
extern int poll_schedule_timeout(struct poll_wqueues *pwq, int state,
ktime_t *expires, unsigned long slack);
extern long select_estimate_accuracy(struct timespec *tv);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 43ae5a574fdb..e5f98b9f0daa 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
+ */
+
#ifndef _LINUX_SCHED_H
#define _LINUX_SCHED_H
@@ -1682,6 +1686,15 @@ static inline struct pid *task_session(struct task_struct *task)
return task->group_leader->pids[PIDTYPE_SID].pid;
}
+static inline struct task_struct *get_thread_process(struct task_struct *thread)
+{
+ struct task_struct *task = thread;
+ while (task->pid != task->tgid) {
+ task = task->group_leader;
+ }
+ return task;
+}
+
struct pid_namespace;
/*