linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Joe Lawrence <joe.lawrence@stratus.com>
Cc: linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>
Subject: Re: docker crashes rcuos in __blkg_release_rcu
Date: Mon, 9 Jun 2014 14:27:29 -0400	[thread overview]
Message-ID: <20140609182728.GB31499@redhat.com> (raw)
In-Reply-To: <20140609174708.GA31499@redhat.com>

On Mon, Jun 09, 2014 at 01:47:08PM -0400, Vivek Goyal wrote:
> On Sun, Jun 08, 2014 at 06:22:00PM -0400, Joe Lawrence wrote:
> 
> [..]
> > Summary thus far:
> > 
> > R12: ffff88103c17a130 = struct rcu_head *rcu_head 
> > R13: ffff88103c17a080 = struct blkcg_gq *blkg
> >      ffff88103fc7df90 = struct request_queue *blkg->q (contains 0x6b
> >                                                        poison-pattern)
> > 
> > commit 2a4fd070 "blkcg: move bulk of blkcg_gq release operations to the
> > RCU callback" shuffled around some code in this space, introducing the
> > the calls to spin_[un]lock_irq(blkg->q->queue_lock).
> > 
> 
> Hi Joe,
> 
> Thanks for reporting and debugging this issue. So in summary it looks
> like that we have freed request queue associated with the blkg and
> when blkg is freed later and tries to access spin lock embedded in
> request queue, it crashes.
> 
> So the question is why request queue is being freed early. Are there any
> reference counting issues.

I am wondering if we need to take a reference on the queue
(blk_get_queue()) in blkg_alloc(), to make sure request queue is
still around when blkg is being freed.

I will try to reproduce the issue locally.

Thanks
Vivek

  reply	other threads:[~2014-06-09 18:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-08 22:22 docker crashes rcuos in __blkg_release_rcu Joe Lawrence
2014-06-09 17:47 ` Vivek Goyal
2014-06-09 18:27   ` Vivek Goyal [this message]
2014-06-10 18:39     ` Joe Lawrence
2014-06-10 19:14       ` Vivek Goyal
2014-06-11 16:32       ` Vivek Goyal
2014-06-19 20:26         ` Tejun Heo
2014-06-19 21:42           ` [PATCH block/for-linus] blkcg: fix use-after-free in __blkg_release_rcu() by making blkcg_gq refcnt an atomic_t Tejun Heo
2014-06-20 14:39             ` Vivek Goyal
2014-06-20 18:50               ` Jens Axboe
2014-06-20 18:50             ` Joe Lawrence
2014-06-10 19:52 ` docker crashes rcuos in __blkg_release_rcu Christoph Lameter

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=20140609182728.GB31499@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=joe.lawrence@stratus.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.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;
as well as URLs for NNTP newsgroup(s).