All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shaohua Li <shlikernel@gmail.com>
To: Guoqing Jiang <gqjiang@suse.com>, Shaohua Li <shli@kernel.org>,
	Xiao Ni <xni@redhat.com>
Cc: linux-raid <linux-raid@vger.kernel.org>,
	Jes.Sorensen@redhat.com, Neil Brown <neilb@suse.de>
Subject: Re: Unable to handle kernel NULL pointer dereference in super_written
Date: Wed, 30 Mar 2016 10:16:37 -0700	[thread overview]
Message-ID: <56FC09F5.20609@gmail.com> (raw)
In-Reply-To: <56FB3B2A.9030405@suse.com>



On 03/29/2016 07:34 PM, Guoqing Jiang wrote:
>
>
> On 03/30/2016 05:37 AM, Shaohua Li wrote:
>> On Tue, Mar 29, 2016 at 08:22:00AM -0400, Xiao Ni wrote:
>>> Hi all
>>>
>>> I encountered one NULL pointer dereference problem.
>>>
>>> The environment:
>>> latest linux-stable and mdadm codes
>>> aarch64 platform
>>> the md device is created with loop devices
>>>
>>> It's a test case to check date integrity. I added the test script as 
>>> the attachment.
>> Could you please try this patch:
>>
>>
>>  From b86d9e1724184c79ad1ea63901aec802492b861c Mon Sep 17 00:00:00 2001
>> Message-Id: 
>> <b86d9e1724184c79ad1ea63901aec802492b861c.1459285706.git.shli@fb.com>
>> From: Shaohua Li <shli@fb.com>
>> Date: Tue, 29 Mar 2016 14:00:19 -0700
>> Subject: [PATCH] MD: add rdev reference for super write
>>
>> md_super_write() and corresponding md_super_wait() generally are called
>> with reconfig_mutex locked, which prevents disk disappears.
>
> Just for curious, I find several paths maybe also don't hold 
> reconfig_mutex,
> take the followings as example.
>
> 1.  md_run -> md_update_sb -> md_super_write/md_super_wait
> 2.  rdev_size_store -> rdev_size_change -> md_super_write/md_super_wait
we do mddev_lock/unlock calling these. The rdev_size_sotre is a bit 
tricky. the lock is hold in rdev_attr_store

Thanks,
Shaohua
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" 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:[~2016-03-30 17:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <678678296.35099303.1459240762496.JavaMail.zimbra@redhat.com>
2016-03-29 12:22 ` Unable to handle kernel NULL pointer dereference in super_written Xiao Ni
2016-03-29 21:37   ` Shaohua Li
2016-03-29 22:23     ` NeilBrown
2016-03-30  2:34     ` Guoqing Jiang
2016-03-30 17:16       ` Shaohua Li [this message]
2016-03-30  7:44     ` Xiao Ni
2016-03-30 17:27       ` Shaohua Li
2016-03-31  3:30         ` Xiao Ni

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=56FC09F5.20609@gmail.com \
    --to=shlikernel@gmail.com \
    --cc=Jes.Sorensen@redhat.com \
    --cc=gqjiang@suse.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=shli@kernel.org \
    --cc=xni@redhat.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.