Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1533818

Re: [RFC][PATCHv4 3/6] printk: introduce per-cpu safe_print seq buffer

From Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Newsgroups linux.kernel
Subject Re: [RFC][PATCHv4 3/6] printk: introduce per-cpu safe_print seq buffer
Date 2016-12-01 06:40 +0100
Message-ID <sJsg9-7Ys-5@gated-at.bofh.it> (permalink)
References <swVfX-3Pm-11@gated-at.bofh.it> <swVfX-3Pm-9@gated-at.bofh.it> <sH5xo-5lp-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On (11/24/16 17:58), Petr Mladek wrote:
[..]
> > +/*
> > + * Lockless printk(), to avoid deadlocks should the printk() recurse
> > + * into itself. It uses a per-CPU buffer to store the message, just like
> > + * NMI.
> > + */
> > +static int vprintk_safe(const char *fmt, va_list args)
> > +{
> > +	struct printk_safe_seq_buf *s = this_cpu_ptr(&safe_print_seq);
> > +
> > +	return printk_safe_log_store(s, fmt, args);
> 
> We should return zero if printk_safe_log_store() returns an error.
> I know that it will get fixed in the next patch. But we should do
> some minimum sanity check here because of bisection.

by the way. vprintk_safe() and the entire printk_safe mechanism are
not yet used in this patch. the patch that enables it comes in later.

	-ss

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [RFC][PATCHv4 3/6] printk: introduce per-cpu safe_print seq  buffer Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-12-01 06:40 +0100

csiph-web