[PATCH next v4 12/15] printk: introduce a kmsg_dump iterator

Petr Mladek pmladek at suse.com
Wed Mar 3 13:48:33 GMT 2021


On Wed 2021-03-03 11:15:25, John Ogness wrote:
> Rather than storing the iterator information in the registered
> kmsg_dumper structure, create a separate iterator structure. The
> kmsg_dump_iter structure can reside on the stack of the caller, thus
> allowing lockless use of the kmsg_dump functions.
> 
> Update code that accesses the kernel logs using the kmsg_dumper
> structure to use the new kmsg_dump_iter structure. For kmsg_dumpers,
> this also means adding a call to kmsg_dump_rewind() to initialize
> the iterator.
> 
> All this is in preparation for removal of @logbuf_lock.
> 
> Signed-off-by: John Ogness <john.ogness at linutronix.de>
> Reviewed-by: Kees Cook <keescook at chromium.org> # pstore

Reviewed-by: Petr Mladek <pmladek at suse.com>

Best Regards,
Petr



More information about the linux-mtd mailing list