From: Richard Weinberger <richard.weinberger@gmail.com>
To: houtao1@huawei.com
Cc: linux-mtd@lists.infradead.org,
David Woodhouse <dwmw2@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
stable <stable@vger.kernel.org>,
boris.brezillon@bootlin.com
Subject: Re: [PATCH] jffs2: ensure wbuf_verify is valid before using it.
Date: Mon, 17 Dec 2018 00:56:55 +0100 [thread overview]
Message-ID: <CAFLxGvzSiFdVmGs4StKkJDyBv698wmLePBnfZwhF0HnEDSmPKA@mail.gmail.com> (raw)
In-Reply-To: <20181020120849.65708-1-houtao1@huawei.com>
On Sat, Oct 20, 2018 at 2:06 PM Hou Tao <houtao1@huawei.com> wrote:
>
> Now MTD emulated by UBI volumn doesn't allocate wbuf_verify in
> jffs2_ubivol_setup(), because UBI can do the verifcation itself,
> so when CONFIG_JFFS2_FS_WBUF_VERIFY is enabled and a MTD device
> emulated by UBI volumn is used, a Oops will occur as show in the
> following trace:
>
> general protection fault: 0000 [#1] SMP KASAN PTI
> CPU: 6 PID: 404 Comm: kworker/6:1 Not tainted 4.19.0-rc8
> Workqueue: events_long delayed_wbuf_sync
> RIP: 0010:ubi_io_read+0x156/0x650
> Call Trace:
> ubi_eba_read_leb+0x57d/0xba0
> ubi_leb_read+0xe5/0x1b0
> gluebi_read+0x10c/0x1a0
> mtd_read+0x112/0x340
> jffs2_verify_write+0xef/0x440
> __jffs2_flush_wbuf+0x3fa/0x3540
> jffs2_flush_wbuf_gc+0x1b1/0x2e0
> process_one_work+0x58b/0x11e0
> worker_thread+0x8f/0xfe0
> kthread+0x2ae/0x3a0
> ret_from_fork+0x35/0x40
>
> Fix the problem by checking the validity of wbuf_verify before
> using it in jffs2_verify_write().
>
> Cc: stable@vger.kernel.org
> Fixes: 0029da3bf430 ("JFFS2: add UBI support")
> Signed-off-by: Hou Tao <houtao1@huawei.com>
Reviewed-by: Richard Weinberger <richard@nod.at>
BTW: Are you actually using glubi? It is on my list of things I'd like
to kill. :-)
--
Thanks,
//richard
prev parent reply other threads:[~2018-12-16 23:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-20 12:08 [PATCH] jffs2: ensure wbuf_verify is valid before using it Hou Tao
2018-12-09 6:35 ` Hou Tao
2018-12-15 13:24 ` Hou Tao
2018-12-16 23:56 ` Richard Weinberger [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=CAFLxGvzSiFdVmGs4StKkJDyBv698wmLePBnfZwhF0HnEDSmPKA@mail.gmail.com \
--to=richard.weinberger@gmail.com \
--cc=boris.brezillon@bootlin.com \
--cc=dwmw2@infradead.org \
--cc=houtao1@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=stable@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).