mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
Merge branch 'akpm' (patches from Andrew)
Merge more updates from Andrew Morton: - a bit more MM - procfs updates - dynamic-debug fixes - lib/ updates - checkpatch - epoll - nilfs2 - signals - rapidio - PID management cleanup and optimization - kcov updates - sysvipc updates - quite a few misc things all over the place * emailed patches from Andrew Morton <[email protected]>: (94 commits) EXPERT Kconfig menu: fix broken EXPERT menu include/asm-generic/topology.h: remove unused parent_node() macro arch/tile/include/asm/topology.h: remove unused parent_node() macro arch/sparc/include/asm/topology_64.h: remove unused parent_node() macro arch/sh/include/asm/topology.h: remove unused parent_node() macro arch/ia64/include/asm/topology.h: remove unused parent_node() macro drivers/pcmcia/sa1111_badge4.c: avoid unused function warning mm: add infrastructure for get_user_pages_fast() benchmarking sysvipc: make get_maxid O(1) again sysvipc: properly name ipc_addid() limit parameter sysvipc: duplicate lock comments wrt ipc_addid() sysvipc: unteach ids->next_id for !CHECKPOINT_RESTORE initramfs: use time64_t timestamps drivers/watchdog: make use of devm_register_reboot_notifier() kernel/reboot.c: add devm_register_reboot_notifier() kcov: update documentation Makefile: support flag -fsanitizer-coverage=trace-cmp kcov: support comparison operands collection kcov: remove pointless current != NULL check kernel/panic.c: add TAINT_AUX ...
This commit is contained in:
commit
fa7f578076
115 changed files with 1892 additions and 952 deletions
|
|
@ -21,6 +21,7 @@ proc-y += loadavg.o
|
|||
proc-y += meminfo.o
|
||||
proc-y += stat.o
|
||||
proc-y += uptime.o
|
||||
proc-y += util.o
|
||||
proc-y += version.o
|
||||
proc-y += softirqs.o
|
||||
proc-y += namespaces.o
|
||||
|
|
|
|||
|
|
@ -366,6 +366,11 @@ static void task_cpus_allowed(struct seq_file *m, struct task_struct *task)
|
|||
cpumask_pr_args(&task->cpus_allowed));
|
||||
}
|
||||
|
||||
static inline void task_core_dumping(struct seq_file *m, struct mm_struct *mm)
|
||||
{
|
||||
seq_printf(m, "CoreDumping:\t%d\n", !!mm->core_state);
|
||||
}
|
||||
|
||||
int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
|
||||
struct pid *pid, struct task_struct *task)
|
||||
{
|
||||
|
|
@ -376,6 +381,7 @@ int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
|
|||
|
||||
if (mm) {
|
||||
task_mem(m, mm);
|
||||
task_core_dumping(m, mm);
|
||||
mmput(mm);
|
||||
}
|
||||
task_sig(m, task);
|
||||
|
|
|
|||
|
|
@ -103,28 +103,7 @@ static inline struct task_struct *get_proc_task(struct inode *inode)
|
|||
void task_dump_owner(struct task_struct *task, mode_t mode,
|
||||
kuid_t *ruid, kgid_t *rgid);
|
||||
|
||||
static inline unsigned name_to_int(const struct qstr *qstr)
|
||||
{
|
||||
const char *name = qstr->name;
|
||||
int len = qstr->len;
|
||||
unsigned n = 0;
|
||||
|
||||
if (len > 1 && *name == '0')
|
||||
goto out;
|
||||
while (len-- > 0) {
|
||||
unsigned c = *name++ - '0';
|
||||
if (c > 9)
|
||||
goto out;
|
||||
if (n >= (~0U-9)/10)
|
||||
goto out;
|
||||
n *= 10;
|
||||
n += c;
|
||||
}
|
||||
return n;
|
||||
out:
|
||||
return ~0U;
|
||||
}
|
||||
|
||||
unsigned name_to_int(const struct qstr *qstr);
|
||||
/*
|
||||
* Offset of the first process in the /proc root directory..
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ static int loadavg_proc_show(struct seq_file *m, void *v)
|
|||
LOAD_INT(avnrun[1]), LOAD_FRAC(avnrun[1]),
|
||||
LOAD_INT(avnrun[2]), LOAD_FRAC(avnrun[2]),
|
||||
nr_running(), nr_threads,
|
||||
task_active_pid_ns(current)->last_pid);
|
||||
idr_get_cursor(&task_active_pid_ns(current)->idr));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
23
fs/proc/util.c
Normal file
23
fs/proc/util.c
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#include <linux/dcache.h>
|
||||
|
||||
unsigned name_to_int(const struct qstr *qstr)
|
||||
{
|
||||
const char *name = qstr->name;
|
||||
int len = qstr->len;
|
||||
unsigned n = 0;
|
||||
|
||||
if (len > 1 && *name == '0')
|
||||
goto out;
|
||||
do {
|
||||
unsigned c = *name++ - '0';
|
||||
if (c > 9)
|
||||
goto out;
|
||||
if (n >= (~0U-9)/10)
|
||||
goto out;
|
||||
n *= 10;
|
||||
n += c;
|
||||
} while (--len > 0);
|
||||
return n;
|
||||
out:
|
||||
return ~0U;
|
||||
}
|
||||
Loading…
Reference in a new issue