All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Elder <elder@ieee.org>
To: Ilya Dryomov <idryomov@gmail.com>, ceph-devel@vger.kernel.org
Subject: Re: RBD Kernel panic rbd_dev_refresh
Date: Thu, 12 Feb 2015 17:34:10 -0600	[thread overview]
Message-ID: <54DD3872.4010500@ieee.org> (raw)
In-Reply-To: <loom.20150212T171651-371@post.gmane.org>

On 02/12/2015 10:19 AM, Ilya Dryomov wrote:
> On Thu, Feb 12, 2015 at 4:24 PM, Hannes Landeholm <hannes@jumpstarter.io> wrote:
>> We don't have any debug symbols but here is a dump of the .ko at this address:
>>
>> https://gist.github.com/hannes-landeholm/b4664e2e7e37ad13177c
>>
>> It's likely this line (rbd_dev_refresh+0xcb)
>>
>> 3d5b:       4c 89 60 50             mov    %r12,0x50(%rax)
>>
>> %rax here is null which causes the invalid write to address 0000000000000050.
>>
>> I'm pretty sure it's the following line in rbd.c which is the offender
>> if you look at the context (below spinlock and shr, above call to
>> revalidate_disk).
>>
>> set_capacity(rbd_dev->disk, size);

I concur with Hannes.  rbd_dev->disk.part0.nr_sectors is at offset
0x50 from the rbd_dev pointer.

> I'll file a ticket and look into this.

Looking at the code, there is a race between checking the REMOVING
flag and the disk getting removed.  The cost of set_capacity is
low and could be done inside the spinlock, but that doesn't help
the revalidate_disk() call.  You probably need either to coordinate
with a semaphore or another rbd_dev->flags bit.

					-Alex


> Thanks,
>
>                  Ilya
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


      reply	other threads:[~2015-02-12 23:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12 14:39 RBD Kernel panic rbd_dev_refresh Thorwald Lundqvist
2015-02-12 15:24 ` Hannes Landeholm
2015-02-12 16:19   ` Ilya Dryomov
2015-02-12 23:34     ` Alex Elder [this message]

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=54DD3872.4010500@ieee.org \
    --to=elder@ieee.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.