lkml.org 
[lkml]   [2019]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] printk: Fix unnecessary returning broken pipe error from devkmsg_read
Date
On 2019-09-23, He Zhe <zhe.he@windriver.com> wrote:
>>>>> When users read the buffer from start, there is no need to return -EPIPE
>>>>> since the possible overflows will not affect the output.
>>>>>
>>>> [..]
>>>>> - if (user->seq < log_first_seq) {
>>>>> + if (user->seq == 0) {
>>>>> + user->seq = log_first_seq;
>>>>> + } else if (user->seq < log_first_seq) {
>>>>> /* our last seen message is gone, return error and reset */
>>>>> user->idx = log_first_idx;
>>>>> user->seq = log_first_seq;
>>
>> IMHO, the patch is wrong.
>
> If this is the case, I'm going to submit a patch for RT kernel.

It should be enough just to remove the if-branch.

FYI, this bug only exists in the RFCv1 of my proposed printk patchset,
which is what RT 5.x is based on. The code currently being prepared for
mainline does not have this issue.

Thanks for reporting. Looking forward to your patch.

John Ogness

\
 
 \ /
  Last update: 2019-09-23 22:00    [W:0.041 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site