OpenVZ Forum


Home » Mailing lists » Devel » [DEVEL] [PATCH 2.6.18] Fix syslog() issues in LTP
[DEVEL] [PATCH 2.6.18] Fix syslog() issues in LTP [message #13685] Fri, 01 June 2007 09:47
gblond is currently offline  gblond
Messages: 64
Registered: May 2007
Member
Patch from Vitaliy Gusev <vgusev@openvz.org>
Fix syslog issues for LTP testscase. Problem was that LTP test calls syslog(2) with wrong arguments and waiting
for a error but syslog() returns zero.

Fixes: http://bugzilla.openvz.org/show_bug.cgi?id=584

--
Vitaliy Gusev


--- linux-2.6.18.i686/kernel/printk.c.orig 2007-06-01 12:15:27.000000000 +0400
+++ linux-2.6.18.i686/kernel/printk.c 2007-06-01 12:36:50.000000000 +0400
@@ -234,9 +234,9 @@ int do_syslog(int type, char __user *buf
int do_clear = 0;
char c;
int error = 0;
+ int is_super = ve_is_super(get_exec_env());

- if (!ve_is_super(get_exec_env()) &&
- (type == 6 || type == 7 || type == 8))
+ if (!is_super && (type == 6 || type == 7))
goto out;

error = security_syslog(type);
@@ -350,6 +350,10 @@ int do_syslog(int type, char __user *buf
error = -EINVAL;
if (len < 1 || len > 8)
goto out;
+ else if (!is_super) {
+ error = 0;
+ goto out;
+ }
if (len < minimum_console_loglevel)
len = minimum_console_loglevel;
console_loglevel = len;
 
Read Message
Previous Topic: [PATCH 0/8] RSS controller based on process containers (v3)
Next Topic: [PATCH] seq_file: more atomicity in traverse()
Goto Forum:
  


Current Time: Sat Aug 23 15:53:11 GMT 2025

Total time taken to generate the page: 0.06600 seconds