[Devel] [PATCH RH9 31/33] ve/itimer: add ve_name to warning for a NULL new_value

Andrey Zhadchenko andrey.zhadchenko at virtuozzo.com
Thu Sep 23 22:08:34 MSK 2021


From: Dmitry Safonov <dsafonov at virtuozzo.com>

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 at virtuozzo.com>
Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>

(cherry picked from vz8 commit 365d1a23d0218fba8dff0508bc011a6612cd2776)
Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
---
 kernel/time/itimer.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/time/itimer.c b/kernel/time/itimer.c
index 00629e6..721741b 100644
--- a/kernel/time/itimer.c
+++ b/kernel/time/itimer.c
@@ -15,6 +15,7 @@
 #include <linux/hrtimer.h>
 #include <trace/events/timer.h>
 #include <linux/compat.h>
+#include <linux/ve.h>
 
 #include <linux/uaccess.h>
 
@@ -341,9 +342,9 @@ static int get_itimerval(struct itimerspec64 *o, const struct __kernel_old_itime
 			return error;
 	} else {
 		memset(&set_buffer, 0, sizeof(set_buffer));
-		printk_once(KERN_WARNING "%s calls setitimer() with new_value NULL pointer."
+		printk_once(KERN_WARNING "cmd: %s CT: %s calls setitimer() with new_value NULL pointer."
 			    " Misfeature support will be removed\n",
-			    current->comm);
+			    current->comm, task_ve_name(current));
 	}
 
 	error = do_setitimer(which, &set_buffer, ovalue ? &get_buffer : NULL);
-- 
1.8.3.1



More information about the Devel mailing list