From: Mike Snitzer <snitzer@redhat.com>
To: DingXiang <dingxiang@huawei.com>
Cc: agk@redhat.com, dm-devel@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH resend] [dm]fix NULL pointer when create dm device
Date: Mon, 29 Feb 2016 16:42:30 -0500 [thread overview]
Message-ID: <20160229214230.GA11697@redhat.com> (raw)
In-Reply-To: <1454387358-16221-1-git-send-email-dingxiang@huawei.com>
On Mon, Feb 01 2016 at 11:29pm -0500,
DingXiang <dingxiang@huawei.com> wrote:
> In some conditions(such as umount fs failed),origin path or origin bdev or both of the two is same
> as cow's.If this happens, origin dev will be freed when get cow dev in function "dm_get_device" ,
> then "s->origin->dev" which used by "dm_exception_store_set_chunk_size" will be a NULL pointer.
>
> Here is my call trace
...
> Call trace:
> [<ffffffc00060b4d8>] dm_exception_store_set_chunk_size+0x6c/0x124
> [<ffffffc00060b6f8>] dm_exception_store_create+0x168/0x1c4
> [<ffffffc00060a940>] snapshot_ctr+0x168/0x5ec
> [<ffffffc0005f6374>] dm_table_add_target+0x114/0x360
> [<ffffffc0005f98c8>] table_load+0x10c/0x314
> [<ffffffc0005fa480>] ctl_ioctl+0x1f8/0x4bc
> [<ffffffc0005fa754>] dm_ctl_ioctl+0x10/0x20
> [<ffffffc0001ae548>] do_vfs_ioctl+0x360/0x5b4
> [<ffffffc0001ae81c>] SyS_ioctl+0x80/0x98
>
> And I think the BUG https://bugzilla.redhat.com/show_bug.cgi?id=1195899
> should be the same reason.
>
> Signed-off-by:Ding Xiang <dingxiang@huawei.com>
Your patch wasn't correct (it couldn't handle device paths like
"253:3", you also didn't check lookup_bdev's return).
But I've staged the following for 4.6:
https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=for-next&id=808e62175f126de041ea1efe94b4e55511c6c119
prev parent reply other threads:[~2016-02-29 21:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-02 4:29 [PATCH resend] [dm]fix NULL pointer when create dm device DingXiang
2016-02-29 21:42 ` Mike Snitzer [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=20160229214230.GA11697@redhat.com \
--to=snitzer@redhat.com \
--cc=agk@redhat.com \
--cc=dingxiang@huawei.com \
--cc=dm-devel@redhat.com \
--cc=linux-kernel@vger.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).