[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140506101050.GC9291@quack.suse.cz>
Date: Tue, 6 May 2014 12:10:50 +0200
From: Jan Kara <jack@...e.cz>
To: John Stultz <john.stultz@...aro.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Jan Kara <jack@...e.cz>,
Peter Zijlstra <peterz@...radead.org>,
Jiri Bohac <jbohac@...e.cz>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH 1/4] printk: Disable preemption for printk_sched
On Mon 05-05-14 13:47:41, John Stultz wrote:
> An earlier change in -mm (printk: remove separate printk_sched
> buffers...), removed the printk_sched irqsave/restore lines
> since it was safe for current users. Since we may be expanding
> usage of printk_sched(), disable preepmtion for this function
> to make it more generally safe to call.
Looks good to me. You can add:
Reviewed-by: Jan Kara <jack@...e.cz>
Honza
>
> Cc: Jan Kara <jack@...e.cz>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Jiri Bohac <jbohac@...e.cz>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Signed-off-by: John Stultz <john.stultz@...aro.org>
> ---
> kernel/printk/printk.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index 82d19e6..57467df 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -2589,12 +2589,14 @@ int printk_sched(const char *fmt, ...)
> va_list args;
> int r;
>
> + preempt_disable();
> va_start(args, fmt);
> r = vprintk_emit(0, SCHED_MESSAGE_LOGLEVEL, NULL, 0, fmt, args);
> va_end(args);
>
> __this_cpu_or(printk_pending, PRINTK_PENDING_OUTPUT);
> irq_work_queue(&__get_cpu_var(wake_up_klogd_work));
> + preempt_enable();
>
> return r;
> }
> --
> 1.9.1
>
--
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists