From: Wei Fang <fangwei1@huawei.com>
To: Jan Kara <jack@suse.cz>
Cc: akpm@linux-foundation.org, hannes@cmpxchg.org, hch@infradead.org,
linux-mm@kvack.org, stable@vger.kernel.org,
Jens Axboe <axboe@kernel.dk>, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH] mm: Fix a NULL dereference crash while accessing bdev->bd_disk
Date: Thu, 1 Dec 2016 10:30:05 +0800 [thread overview]
Message-ID: <583F8B2D.8090908@huawei.com> (raw)
In-Reply-To: <20161130095104.GB20030@quack2.suse.cz>
Hi, Jan,
On 2016/11/30 17:51, Jan Kara wrote:
> On Tue 29-11-16 09:58:31, Wei Fang wrote:
>> Hi, Jan,
>>
>> On 2016/11/28 18:07, Jan Kara wrote:
>>> Good catch but I don't like sprinkling checks like this into the writeback
>>> code and furthermore we don't want to call into writeback code when block
>>> device is in the process of being destroyed which is what would happen with
>>> your patch. That is a bug waiting to happen...
>>
>> Agreed. Need another way to fix this problem. I looked through the
>> writeback cgroup code in __filemap_fdatawrite_range(), found if we
>> turn on CONFIG_CGROUP_WRITEBACK, a new crash will happen.
>
> OK, can you test with attached patch please? Thanks!
I've tested this patch with linux-next about 2 hours, and all goes well.
Without this patch, kernel crashes in minutes.
Thanks,
Wei
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Wei Fang <fangwei1@huawei.com>
To: Jan Kara <jack@suse.cz>
Cc: <akpm@linux-foundation.org>, <hannes@cmpxchg.org>,
<hch@infradead.org>, <linux-mm@kvack.org>,
<stable@vger.kernel.org>, Jens Axboe <axboe@kernel.dk>,
Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH] mm: Fix a NULL dereference crash while accessing bdev->bd_disk
Date: Thu, 1 Dec 2016 10:30:05 +0800 [thread overview]
Message-ID: <583F8B2D.8090908@huawei.com> (raw)
In-Reply-To: <20161130095104.GB20030@quack2.suse.cz>
Hi, Jan,
On 2016/11/30 17:51, Jan Kara wrote:
> On Tue 29-11-16 09:58:31, Wei Fang wrote:
>> Hi, Jan,
>>
>> On 2016/11/28 18:07, Jan Kara wrote:
>>> Good catch but I don't like sprinkling checks like this into the writeback
>>> code and furthermore we don't want to call into writeback code when block
>>> device is in the process of being destroyed which is what would happen with
>>> your patch. That is a bug waiting to happen...
>>
>> Agreed. Need another way to fix this problem. I looked through the
>> writeback cgroup code in __filemap_fdatawrite_range(), found if we
>> turn on CONFIG_CGROUP_WRITEBACK, a new crash will happen.
>
> OK, can you test with attached patch please? Thanks!
I've tested this patch with linux-next about 2 hours, and all goes well.
Without this patch, kernel crashes in minutes.
Thanks,
Wei
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-12-01 2:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-26 2:06 [PATCH] mm: Fix a NULL dereference crash while accessing bdev->bd_disk Wei Fang
2016-11-26 2:06 ` Wei Fang
2016-11-28 10:07 ` Jan Kara
2016-11-28 15:57 ` Tejun Heo
2016-11-29 9:30 ` Jan Kara
2016-11-29 16:43 ` Tejun Heo
2016-11-30 9:50 ` Jan Kara
2016-11-29 1:58 ` Wei Fang
2016-11-29 1:58 ` Wei Fang
2016-11-30 9:51 ` Jan Kara
2016-11-30 9:51 ` Jan Kara
2016-12-01 2:30 ` Wei Fang [this message]
2016-12-01 2:30 ` Wei Fang
2016-12-01 8:18 ` Jan Kara
2016-11-29 23:08 ` Andrew Morton
2016-11-29 23:08 ` Andrew Morton
2016-11-30 7:30 ` Jan Kara
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=583F8B2D.8090908@huawei.com \
--to=fangwei1@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=hannes@cmpxchg.org \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-mm@kvack.org \
--cc=stable@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 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.