|
@@ -1021,7 +1021,6 @@ int do_syslog(int type, char __user *buf, int len, bool from_file)
|
|
{
|
|
{
|
|
bool clear = false;
|
|
bool clear = false;
|
|
static int saved_console_loglevel = -1;
|
|
static int saved_console_loglevel = -1;
|
|
- static DEFINE_MUTEX(syslog_mutex);
|
|
|
|
int error;
|
|
int error;
|
|
|
|
|
|
error = check_syslog_permissions(type, from_file);
|
|
error = check_syslog_permissions(type, from_file);
|
|
@@ -1048,17 +1047,11 @@ int do_syslog(int type, char __user *buf, int len, bool from_file)
|
|
error = -EFAULT;
|
|
error = -EFAULT;
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
- error = mutex_lock_interruptible(&syslog_mutex);
|
|
|
|
- if (error)
|
|
|
|
- goto out;
|
|
|
|
error = wait_event_interruptible(log_wait,
|
|
error = wait_event_interruptible(log_wait,
|
|
syslog_seq != log_next_seq);
|
|
syslog_seq != log_next_seq);
|
|
- if (error) {
|
|
|
|
- mutex_unlock(&syslog_mutex);
|
|
|
|
|
|
+ if (error)
|
|
goto out;
|
|
goto out;
|
|
- }
|
|
|
|
error = syslog_print(buf, len);
|
|
error = syslog_print(buf, len);
|
|
- mutex_unlock(&syslog_mutex);
|
|
|
|
break;
|
|
break;
|
|
/* Read/clear last kernel messages */
|
|
/* Read/clear last kernel messages */
|
|
case SYSLOG_ACTION_READ_CLEAR:
|
|
case SYSLOG_ACTION_READ_CLEAR:
|