From: Yue Hu <zbestahu@gmail.com>
To: Jingbo Xu <jefflexu@linux.alibaba.com>
Cc: xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org,
huyue2@coolpad.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] erofs: fix NULL dereference of dif->bdev_handle in fscache mode
Date: Tue, 14 Nov 2023 16:14:15 +0800 [thread overview]
Message-ID: <20231114161415.00003d8e.zbestahu@gmail.com> (raw)
In-Reply-To: <20231114070704.23398-1-jefflexu@linux.alibaba.com>
On Tue, 14 Nov 2023 15:07:04 +0800
Jingbo Xu <jefflexu@linux.alibaba.com> wrote:
> Avoid NULL dereference of dif->bdev_handle, as dif->bdev_handle is NULL
> in fscache mode.
>
> BUG: kernel NULL pointer dereference, address: 0000000000000000
> RIP: 0010:erofs_map_dev+0xbd/0x1c0
> Call Trace:
> <TASK>
> erofs_fscache_data_read_slice+0xa7/0x340
> erofs_fscache_data_read+0x11/0x30
> erofs_fscache_readahead+0xd9/0x100
> read_pages+0x47/0x1f0
> page_cache_ra_order+0x1e5/0x270
> filemap_get_pages+0xf2/0x5f0
> filemap_read+0xb8/0x2e0
> vfs_read+0x18d/0x2b0
> ksys_read+0x53/0xd0
> do_syscall_64+0x42/0xf0
> entry_SYSCALL_64_after_hwframe+0x6e/0x76
>
> Reported-by: Yiqun Leng <yqleng@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7245
> Fixes: 49845720080d ("erofs: Convert to use bdev_open_by_path()")
> Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Yue Hu <huyue2@coolpad.com>
next prev parent reply other threads:[~2023-11-14 8:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-14 7:07 Jingbo Xu
2023-11-14 7:41 ` Gao Xiang
2023-11-14 8:14 ` Yue Hu [this message]
2023-11-16 6:12 ` Chao Yu
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=20231114161415.00003d8e.zbestahu@gmail.com \
--to=zbestahu@gmail.com \
--cc=chao@kernel.org \
--cc=huyue2@coolpad.com \
--cc=jefflexu@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xiang@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
all inboxes | Powered by JetHome®