Re: [RFC PATCH v4 4/9] printk-rb: initialize new descriptors as invalid

2019-08-20 Thread John Ogness
On 2019-08-20, Petr Mladek wrote: >> Initialize never-used descriptors as permanently invalid so there > > The word "permanently" is confusing. It suggests that it will > never ever be valid again. I would just remove the word. Agreed. >> is no risk of the descriptor unexpectedly being

Re: [RFC PATCH v4 4/9] printk-rb: initialize new descriptors as invalid

2019-08-20 Thread Sergey Senozhatsky
On (08/20/19 11:23), Petr Mladek wrote: > > is no risk of the descriptor unexpectedly being determined as > > valid due to dataring head overflowing/wrapping. > > Please, provide more details about the solved race. Is it because > some reader could have reference to an invalid (reused)

Re: [RFC PATCH v4 4/9] printk-rb: initialize new descriptors as invalid

2019-08-20 Thread Petr Mladek
On Thu 2019-08-08 00:32:29, John Ogness wrote: > Initialize never-used descriptors as permanently invalid so there The word "permanently" is confusing. It suggests that it will never ever be valid again. I would just remove the word. > is no risk of the descriptor unexpectedly being determined

[RFC PATCH v4 4/9] printk-rb: initialize new descriptors as invalid

2019-08-07 Thread John Ogness
Initialize never-used descriptors as permanently invalid so there is no risk of the descriptor unexpectedly being determined as valid due to dataring head overflowing/wrapping. Signed-off-by: John Ogness --- kernel/printk/dataring.c | 42 +++---