summaryrefslogtreecommitdiff
path: root/include
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
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')
-rw-r--r--include/linux/eventpoll.h5
-rw-r--r--include/linux/poll.h5
-rw-r--r--include/linux/sched.h13
-rw-r--r--include/net/sock.h4
4 files changed, 27 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;
/*
diff --git a/include/net/sock.h b/include/net/sock.h
index 59a8947a1944..4e4c15762ba9 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -36,6 +36,8 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
+ *
+ * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
*/
#ifndef _SOCK_H
#define _SOCK_H
@@ -1476,6 +1478,8 @@ extern int compat_sock_common_setsockopt(struct socket *sock, int level,
extern void sk_common_release(struct sock *sk);
+extern char *sk_get_waiting_task_cmdline(struct sock *sk, char *cmdline);
+
/*
* Default socket callbacks and setup code
*/