[RFC PATCH 07/10] fs/proc: hide PF_IO_WORKER in get_task_cmdline()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We should not return the userspace cmdline for io_worker threads.

Signed-off-by: Stefan Metzmacher <metze@xxxxxxxxx>
---
 fs/proc/base.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/proc/base.c b/fs/proc/base.c
index 3851bfcdba56..6e04278de582 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -344,6 +344,9 @@ static ssize_t get_task_cmdline(struct task_struct *tsk, char __user *buf,
 	struct mm_struct *mm;
 	ssize_t ret;
 
+	if (tsk->flags & PF_IO_WORKER)
+		return 0;
+
 	mm = get_task_mm(tsk);
 	if (!mm)
 		return 0;
-- 
2.25.1




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux