public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Mike Galbraith <efault@gmx.de>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-rt-users <linux-rt-users@vger.kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [patch-rt] drivers/zram: fix zcomp_stream_get() smp_processor_id() use in preemptible code
Date: Thu, 31 Aug 2017 21:11:08 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1708312103530.2346@nanos> (raw)
In-Reply-To: <1503482249.4970.7.camel@gmx.de>

On Wed, 23 Aug 2017, Mike Galbraith wrote:

> 
> Use get_local_ptr() vs this_cpu_ptr().
> 
> Signed-off-by: Mike Galbraith <efault@gmx.de>
> ---
>  drivers/block/zram/zcomp.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> --- a/drivers/block/zram/zcomp.c
> +++ b/drivers/block/zram/zcomp.c
> @@ -120,7 +120,7 @@ struct zcomp_strm *zcomp_stream_get(stru
>  {
>  	struct zcomp_strm *zstrm;
>  
> -	zstrm = *this_cpu_ptr(comp->stream);
> +	zstrm = *get_local_ptr(comp->stream);

This looks wrong. On mainline the calling code must have preemption disable
somehow, otherwise this_cpu_ptr() would not work.

Looking at the call site it is;

	zram_slot_lock()
	  bit_spin_lock()

which is of course evading lockdep and everything else debugging wise.

Sebastian, do we have migration protection in bitlocked regions? And we
shpuld look into converting that into a spinlock on rt.

Thanks,

	tglx


  parent reply	other threads:[~2017-08-31 19:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-18 12:09 [ANNOUNCE] v4.11.12-rt10 Sebastian Andrzej Siewior
2017-08-23  9:53 ` v4.11.12-rt10 - hotplug lockdep splat Mike Galbraith
2017-08-31 16:18   ` Sebastian Andrzej Siewior
2017-09-02  7:00     ` Mike Galbraith
2017-09-03  2:48     ` Mike Galbraith
2017-09-04 14:58       ` Sebastian Andrzej Siewior
2017-08-23  9:57 ` [patch-rt] drivers/zram: fix zcomp_stream_get() smp_processor_id() use in preemptible code Mike Galbraith
2017-08-31 15:48   ` Sebastian Andrzej Siewior
2017-08-31 19:11   ` Thomas Gleixner [this message]
2017-08-31 19:26     ` Sebastian Andrzej Siewior
2017-08-31 19:32       ` Thomas Gleixner
2017-09-01  7:40         ` Sebastian Andrzej Siewior
2017-09-01  7:47           ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1708312103530.2346@nanos \
    --to=tglx@linutronix.de \
    --cc=bigeasy@linutronix.de \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox