[Devel,2/1] fs: add ve_name to obsolete bdflush warning

Submitted by Dmitry Safonov on July 19, 2016, 2:57 p.m.

Details

Message ID 20160719145720.3411-1-dsafonov@virtuozzo.com
State New
Series "itimer: add ve_name to warning for a NULL new_value"
Headers show

Commit Message

Dmitry Safonov July 19, 2016, 2:57 p.m.
The host admin may be confused by warning in dmesg with only
"comm", which may be anything a user in a container chooses.
Add ve name to this warning.

https://jira.sw.ru/browse/PSBM-49818

Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
---
 fs/buffer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/fs/buffer.c b/fs/buffer.c
index 2b709d45ed6f..3ab44512f549 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -3300,8 +3300,8 @@  SYSCALL_DEFINE2(bdflush, int, func, long, data)
 	if (msg_count < 5) {
 		msg_count++;
 		printk(KERN_INFO
-			"warning: process `%s' used the obsolete bdflush"
-			" system call\n", current->comm);
+			"warning: process `%s', VE: %s used the obsolete bdflush"
+			" system call\n", current->comm, task_ve_name(current));
 		printk(KERN_INFO "Fix your initscripts?\n");
 	}
 

Comments

Dmitry Safonov July 19, 2016, 3:13 p.m.
On 07/19/2016 05:57 PM, Dmitry Safonov wrote:
> The host admin may be confused by warning in dmesg with only
> "comm", which may be anything a user in a container chooses.
> Add ve name to this warning.
>
> https://jira.sw.ru/browse/PSBM-49818
>
> Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
> ---
>  fs/buffer.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Ok, drop the second patch -- it's under capable(CAP_SYS_ADMIN),
not under ve_capable(CAP_SYS_ADMIN)), so this syscall isn't
reachable from CT.