|
@@ -172,9 +172,10 @@ static ssize_t logger_read(struct file *file, char __user *buf,
|
|
|
|
|
|
start:
|
|
start:
|
|
while (1) {
|
|
while (1) {
|
|
|
|
+ mutex_lock(&log->mutex);
|
|
|
|
+
|
|
prepare_to_wait(&log->wq, &wait, TASK_INTERRUPTIBLE);
|
|
prepare_to_wait(&log->wq, &wait, TASK_INTERRUPTIBLE);
|
|
|
|
|
|
- mutex_lock(&log->mutex);
|
|
|
|
ret = (log->w_off == reader->r_off);
|
|
ret = (log->w_off == reader->r_off);
|
|
mutex_unlock(&log->mutex);
|
|
mutex_unlock(&log->mutex);
|
|
if (!ret)
|
|
if (!ret)
|