diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/printk.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index 37cde752cb8a..be9a82b2f0b3 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -1021,7 +1021,6 @@ int do_syslog(int type, char __user *buf, int len, bool from_file) | |||
1021 | { | 1021 | { |
1022 | bool clear = false; | 1022 | bool clear = false; |
1023 | static int saved_console_loglevel = -1; | 1023 | static int saved_console_loglevel = -1; |
1024 | static DEFINE_MUTEX(syslog_mutex); | ||
1025 | int error; | 1024 | int error; |
1026 | 1025 | ||
1027 | error = check_syslog_permissions(type, from_file); | 1026 | error = check_syslog_permissions(type, from_file); |
@@ -1048,17 +1047,11 @@ int do_syslog(int type, char __user *buf, int len, bool from_file) | |||
1048 | error = -EFAULT; | 1047 | error = -EFAULT; |
1049 | goto out; | 1048 | goto out; |
1050 | } | 1049 | } |
1051 | error = mutex_lock_interruptible(&syslog_mutex); | ||
1052 | if (error) | ||
1053 | goto out; | ||
1054 | error = wait_event_interruptible(log_wait, | 1050 | error = wait_event_interruptible(log_wait, |
1055 | syslog_seq != log_next_seq); | 1051 | syslog_seq != log_next_seq); |
1056 | if (error) { | 1052 | if (error) |
1057 | mutex_unlock(&syslog_mutex); | ||
1058 | goto out; | 1053 | goto out; |
1059 | } | ||
1060 | error = syslog_print(buf, len); | 1054 | error = syslog_print(buf, len); |
1061 | mutex_unlock(&syslog_mutex); | ||
1062 | break; | 1055 | break; |
1063 | /* Read/clear last kernel messages */ | 1056 | /* Read/clear last kernel messages */ |
1064 | case SYSLOG_ACTION_READ_CLEAR: | 1057 | case SYSLOG_ACTION_READ_CLEAR: |