public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: David Howells <dhowells@redhat.com>
Cc: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>,
	WenRuo Qu <wqu@suse.com>,
	linux-btrfs@vger.kernel.org, nborisov@suse.com
Subject: Re: fs/btrfs/volumes.c:6114 suspicious rcu_dereference_check() usage!
Date: Thu, 23 Aug 2018 17:59:55 +0200	[thread overview]
Message-ID: <20180823155955.GO24025@suse.cz> (raw)
In-Reply-To: <22614.1535039351@warthog.procyon.org.uk>

On Thu, Aug 23, 2018 at 04:49:11PM +0100, David Howells wrote:
> I'm seeing the attached message generated from this line:
> 
> 	btrfs_debug_in_rcu(fs_info,
> 	"btrfs_map_bio: rw %d 0x%x, sector=%llu, dev=%lu (%s id %llu), size=%u",
> 		bio_op(bio), bio->bi_opf, (u64)bio->bi_iter.bi_sector,
> 		(u_long)dev->bdev->bd_dev, rcu_str_deref(dev->name), dev->devid,
> 		bio->bi_iter.bi_size);
> 
> in submit_stripe_bio().  I'm not sure exactly why, but I suspect
> rcu_str_deref() is the point from where it is generated.

Yes, the macro is rcu_dereference in disguise.

The code previously had explicit rcu_lock/unlock, now it uses the
btrfs_debug_in_rcu helper which is supposed to provide that. It's
possible that the helper is missing it due to some #ifdef mess, but I
don't see it.

  reply	other threads:[~2018-08-23 19:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-23 15:49 fs/btrfs/volumes.c:6114 suspicious rcu_dereference_check() usage! David Howells
2018-08-23 15:59 ` David Sterba [this message]
2018-08-23 16:08   ` David Howells
2018-08-24  2:07 ` Misono Tomohiro
2018-08-24  2:35   ` [PATCH] btrfs: ctree.h: Fix suspicious rcu usage warning in btrfs_debug_in_rcu() Misono Tomohiro
2018-08-24 11:46     ` David Sterba
2018-08-24 12:08     ` David Howells

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=20180823155955.GO24025@suse.cz \
    --to=dsterba@suse.cz \
    --cc=dhowells@redhat.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=misono.tomohiro@jp.fujitsu.com \
    --cc=nborisov@suse.com \
    --cc=wqu@suse.com \
    /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