Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1470453
| From | Petr Mladek <pmladek@suse.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu |
| Date | 2016-08-25 23:40 +0200 |
| Message-ID | <saaxs-6xu-29@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <s9inn-3ui-23@gated-at.bofh.it> <s9v1f-3wp-5@gated-at.bofh.it> <s9BT5-89D-43@gated-at.bofh.it> <s9HlL-3tn-1@gated-at.bofh.it> <saaxs-6xu-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu 2016-08-25 23:27:40, Petr Mladek wrote:
> On Wed 2016-08-24 23:27:29, Sergey Senozhatsky wrote:
> > On (08/24/16 10:19), Petr Mladek wrote:
> > > > On (08/23/16 13:47), Petr Mladek wrote:
> > > > [..]
> > > > > > if (!(lflags & LOG_NEWLINE)) {
> > > > > > + if (!this_cpu_read(cont_printing)) {
> > > > > > + if (system_state == SYSTEM_RUNNING) {
> > > > > > + this_cpu_write(cont_printing, true);
> > > > > > + preempt_disable();
> > > > > > + }
> > > > > > + }
> > > > >
> > > > > I am afraid that this is not acceptable. It means that printk() will have
> > > > > an unexpected side effect. The missing "\n" at the end of a printed
> > > > > string would disable preemption. See below for more.
> > > >
> > > > missing '\n' must WARN about "sched while atomic" eventually, so it
> > > > shouldn't go unnoticed or stay hidden.
> > >
> > > Well, it will still force people to rebuilt a test kernel because they
> > > forget to use '\n" and the test kernel is unusable.
> >
> > you are right. misusage of printk() will now force user to go and fix
> > it. the kernel most likely will be rebuilt anyway - there is a missing
> > \n after all.
> Of course, it would be great to fix it transparently. But if there must
> be a burden, I would prefer to keep it on the "corner" case users
> rather than to push it on everyday users.
Not to say that a messed log is much less painful than a locked system.
Best Regards,
Petr
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH][RFC] printk: make pr_cont buffer per-cpu Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-08-22 17:50 +0200
Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu Joe Perches <joe@perches.com> - 2016-08-22 18:20 +0200
Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-08-23 03:20 +0200
Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-08-23 07:20 +0200
Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu Petr Mladek <pmladek@suse.com> - 2016-08-23 13:50 +0200
Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-08-24 03:20 +0200
Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu Petr Mladek <pmladek@suse.com> - 2016-08-24 10:40 +0200
Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-08-24 16:30 +0200
Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu Petr Mladek <pmladek@suse.com> - 2016-08-25 23:40 +0200
Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu Petr Mladek <pmladek@suse.com> - 2016-08-26 00:20 +0200
csiph-web