* Please add 98fb1ffd8154890d7051750e61ff5548c3ee2ab2
@ 2015-09-15 14:48 Richard Weinberger
2015-09-28 13:29 ` Luis Henriques
0 siblings, 1 reply; 5+ messages in thread
From: Richard Weinberger @ 2015-09-15 14:48 UTC (permalink / raw)
To: stable
Hi!
Can you please add this commit to stable?
commit 98fb1ffd8154890d7051750e61ff5548c3ee2ab2
Author: Kevin Cernekee <cernekee@chromium.org>
Date: Wed Apr 22 09:30:53 2015 -0300
UBI: block: Add missing cache flushes
The fix affects all kernels >= v3.15.
Thanks,
//richard
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Please add 98fb1ffd8154890d7051750e61ff5548c3ee2ab2 2015-09-15 14:48 Please add 98fb1ffd8154890d7051750e61ff5548c3ee2ab2 Richard Weinberger @ 2015-09-28 13:29 ` Luis Henriques 2015-09-28 21:03 ` Richard Weinberger 0 siblings, 1 reply; 5+ messages in thread From: Luis Henriques @ 2015-09-28 13:29 UTC (permalink / raw) To: Richard Weinberger; +Cc: stable On Tue, Sep 15, 2015 at 04:48:07PM +0200, Richard Weinberger wrote: > Hi! > > Can you please add this commit to stable? > commit 98fb1ffd8154890d7051750e61ff5548c3ee2ab2 > Author: Kevin Cernekee <cernekee@chromium.org> > Date: Wed Apr 22 09:30:53 2015 -0300 > > UBI: block: Add missing cache flushes > > The fix affects all kernels >= v3.15. > I was trying to apply this commit to 3.16, but it requires a backport. Could you please confirm the following backport is correct? It can probably be applied to other stable kernels, but I haven't check. Cheers, -- Lu�s >From e781e504616d2652e9fc11f6536dd8be221298f9 Mon Sep 17 00:00:00 2001 From: Kevin Cernekee <cernekee@chromium.org> Date: Wed, 22 Apr 2015 09:30:53 -0300 Subject: [PATCH] UBI: block: Add missing cache flushes commit 98fb1ffd8154890d7051750e61ff5548c3ee2ab2 upstream. Block drivers are responsible for calling flush_dcache_page() on each BIO request. This operation keeps the I$ coherent with the D$ on architectures that don't have hardware coherency support. Without this flush, random crashes are seen when executing user programs from an ext4 filesystem backed by a ubiblock device. This patch is based on the change implemented in commit 2d4dc890b5c8 ("block: add helpers to run flush_dcache_page() against a bio and a request's pages"). Fixes: 9d54c8a33eec ("UBI: R/O block driver on top of UBI volumes") Signed-off-by: Kevin Cernekee <cernekee@chromium.org> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@imgtec.com> Signed-off-by: Richard Weinberger <richard@nod.at> [ luis: backported to 3.16: adjusted context ] Signed-off-by: Luis Henriques <luis.henriques@canonical.com> --- drivers/mtd/ubi/block.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c index 8457df7ec5af..d3fbda7eae98 100644 --- a/drivers/mtd/ubi/block.c +++ b/drivers/mtd/ubi/block.c @@ -275,6 +275,7 @@ static void ubiblock_do_work(struct work_struct *work) spin_unlock_irq(rq->queue_lock); res = do_ubiblock_request(dev, req); spin_lock_irq(rq->queue_lock); + rq_flush_dcache_pages(req); /* * If we're done with this request, ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: Please add 98fb1ffd8154890d7051750e61ff5548c3ee2ab2 2015-09-28 13:29 ` Luis Henriques @ 2015-09-28 21:03 ` Richard Weinberger 2015-09-28 21:12 ` Kevin Cernekee 0 siblings, 1 reply; 5+ messages in thread From: Richard Weinberger @ 2015-09-28 21:03 UTC (permalink / raw) To: Luis Henriques; +Cc: stable, Ezequiel Garcia, Kevin Cernekee CC'in patch authors. Am 28.09.2015 um 15:29 schrieb Luis Henriques: > On Tue, Sep 15, 2015 at 04:48:07PM +0200, Richard Weinberger wrote: >> Hi! >> >> Can you please add this commit to stable? >> commit 98fb1ffd8154890d7051750e61ff5548c3ee2ab2 >> Author: Kevin Cernekee <cernekee@chromium.org> >> Date: Wed Apr 22 09:30:53 2015 -0300 >> >> UBI: block: Add missing cache flushes >> >> The fix affects all kernels >= v3.15. >> > > I was trying to apply this commit to 3.16, but it requires a backport. > Could you please confirm the following backport is correct? It can > probably be applied to other stable kernels, but I haven't check. > > Cheers, > -- > Lu�s > > From e781e504616d2652e9fc11f6536dd8be221298f9 Mon Sep 17 00:00:00 2001 > From: Kevin Cernekee <cernekee@chromium.org> > Date: Wed, 22 Apr 2015 09:30:53 -0300 > Subject: [PATCH] UBI: block: Add missing cache flushes > > commit 98fb1ffd8154890d7051750e61ff5548c3ee2ab2 upstream. > > Block drivers are responsible for calling flush_dcache_page() on each > BIO request. This operation keeps the I$ coherent with the D$ on > architectures that don't have hardware coherency support. Without this > flush, random crashes are seen when executing user programs from an ext4 > filesystem backed by a ubiblock device. > > This patch is based on the change implemented in commit 2d4dc890b5c8 > ("block: add helpers to run flush_dcache_page() against a bio and a > request's pages"). > > Fixes: 9d54c8a33eec ("UBI: R/O block driver on top of UBI volumes") > Signed-off-by: Kevin Cernekee <cernekee@chromium.org> > Signed-off-by: Ezequiel Garcia <ezequiel.garcia@imgtec.com> > Signed-off-by: Richard Weinberger <richard@nod.at> > [ luis: backported to 3.16: adjusted context ] > Signed-off-by: Luis Henriques <luis.henriques@canonical.com> > --- > drivers/mtd/ubi/block.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c > index 8457df7ec5af..d3fbda7eae98 100644 > --- a/drivers/mtd/ubi/block.c > +++ b/drivers/mtd/ubi/block.c > @@ -275,6 +275,7 @@ static void ubiblock_do_work(struct work_struct *work) > spin_unlock_irq(rq->queue_lock); > res = do_ubiblock_request(dev, req); > spin_lock_irq(rq->queue_lock); > + rq_flush_dcache_pages(req); > > /* > * If we're done with this request, > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Please add 98fb1ffd8154890d7051750e61ff5548c3ee2ab2 2015-09-28 21:03 ` Richard Weinberger @ 2015-09-28 21:12 ` Kevin Cernekee 2015-09-29 9:16 ` Luis Henriques 0 siblings, 1 reply; 5+ messages in thread From: Kevin Cernekee @ 2015-09-28 21:12 UTC (permalink / raw) To: Luis Henriques; +Cc: stable, Richard Weinberger, Ezequiel Garcia On Mon, Sep 28, 2015 at 4:03 PM, Richard Weinberger <richard@nod.at> wrote: > CC'in patch authors. > > Am 28.09.2015 um 15:29 schrieb Luis Henriques: >> On Tue, Sep 15, 2015 at 04:48:07PM +0200, Richard Weinberger wrote: >>> Hi! >>> >>> Can you please add this commit to stable? >>> commit 98fb1ffd8154890d7051750e61ff5548c3ee2ab2 >>> Author: Kevin Cernekee <cernekee@chromium.org> >>> Date: Wed Apr 22 09:30:53 2015 -0300 >>> >>> UBI: block: Add missing cache flushes >>> >>> The fix affects all kernels >= v3.15. >>> >> >> I was trying to apply this commit to 3.16, but it requires a backport. >> Could you please confirm the following backport is correct? It can >> probably be applied to other stable kernels, but I haven't check. >> >> Cheers, >> -- >> Luís >> >> From e781e504616d2652e9fc11f6536dd8be221298f9 Mon Sep 17 00:00:00 2001 >> From: Kevin Cernekee <cernekee@chromium.org> >> Date: Wed, 22 Apr 2015 09:30:53 -0300 >> Subject: [PATCH] UBI: block: Add missing cache flushes >> >> commit 98fb1ffd8154890d7051750e61ff5548c3ee2ab2 upstream. >> >> Block drivers are responsible for calling flush_dcache_page() on each >> BIO request. This operation keeps the I$ coherent with the D$ on >> architectures that don't have hardware coherency support. Without this >> flush, random crashes are seen when executing user programs from an ext4 >> filesystem backed by a ubiblock device. >> >> This patch is based on the change implemented in commit 2d4dc890b5c8 >> ("block: add helpers to run flush_dcache_page() against a bio and a >> request's pages"). >> >> Fixes: 9d54c8a33eec ("UBI: R/O block driver on top of UBI volumes") >> Signed-off-by: Kevin Cernekee <cernekee@chromium.org> >> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@imgtec.com> >> Signed-off-by: Richard Weinberger <richard@nod.at> >> [ luis: backported to 3.16: adjusted context ] >> Signed-off-by: Luis Henriques <luis.henriques@canonical.com> >> --- >> drivers/mtd/ubi/block.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c >> index 8457df7ec5af..d3fbda7eae98 100644 >> --- a/drivers/mtd/ubi/block.c >> +++ b/drivers/mtd/ubi/block.c >> @@ -275,6 +275,7 @@ static void ubiblock_do_work(struct work_struct *work) >> spin_unlock_irq(rq->queue_lock); >> res = do_ubiblock_request(dev, req); >> spin_lock_irq(rq->queue_lock); >> + rq_flush_dcache_pages(req); >> >> /* >> * If we're done with this request, >> In our project's 3.14 tree I added the flush in a slightly different place, but it looks like your patch would work too: https://chromium-review.googlesource.com/#/c/251693/2/drivers/mtd/ubi/block.c ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Please add 98fb1ffd8154890d7051750e61ff5548c3ee2ab2 2015-09-28 21:12 ` Kevin Cernekee @ 2015-09-29 9:16 ` Luis Henriques 0 siblings, 0 replies; 5+ messages in thread From: Luis Henriques @ 2015-09-29 9:16 UTC (permalink / raw) To: Kevin Cernekee; +Cc: stable, Richard Weinberger, Ezequiel Garcia On Mon, Sep 28, 2015 at 04:12:55PM -0500, Kevin Cernekee wrote: > On Mon, Sep 28, 2015 at 4:03 PM, Richard Weinberger <richard@nod.at> wrote: > > CC'in patch authors. > > > > Am 28.09.2015 um 15:29 schrieb Luis Henriques: > >> On Tue, Sep 15, 2015 at 04:48:07PM +0200, Richard Weinberger wrote: > >>> Hi! > >>> > >>> Can you please add this commit to stable? > >>> commit 98fb1ffd8154890d7051750e61ff5548c3ee2ab2 > >>> Author: Kevin Cernekee <cernekee@chromium.org> > >>> Date: Wed Apr 22 09:30:53 2015 -0300 > >>> > >>> UBI: block: Add missing cache flushes > >>> > >>> The fix affects all kernels >= v3.15. > >>> > >> > >> I was trying to apply this commit to 3.16, but it requires a backport. > >> Could you please confirm the following backport is correct? It can > >> probably be applied to other stable kernels, but I haven't check. > >> > >> Cheers, > >> -- > >> Lu�s > >> > >> From e781e504616d2652e9fc11f6536dd8be221298f9 Mon Sep 17 00:00:00 2001 > >> From: Kevin Cernekee <cernekee@chromium.org> > >> Date: Wed, 22 Apr 2015 09:30:53 -0300 > >> Subject: [PATCH] UBI: block: Add missing cache flushes > >> > >> commit 98fb1ffd8154890d7051750e61ff5548c3ee2ab2 upstream. > >> > >> Block drivers are responsible for calling flush_dcache_page() on each > >> BIO request. This operation keeps the I$ coherent with the D$ on > >> architectures that don't have hardware coherency support. Without this > >> flush, random crashes are seen when executing user programs from an ext4 > >> filesystem backed by a ubiblock device. > >> > >> This patch is based on the change implemented in commit 2d4dc890b5c8 > >> ("block: add helpers to run flush_dcache_page() against a bio and a > >> request's pages"). > >> > >> Fixes: 9d54c8a33eec ("UBI: R/O block driver on top of UBI volumes") > >> Signed-off-by: Kevin Cernekee <cernekee@chromium.org> > >> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@imgtec.com> > >> Signed-off-by: Richard Weinberger <richard@nod.at> > >> [ luis: backported to 3.16: adjusted context ] > >> Signed-off-by: Luis Henriques <luis.henriques@canonical.com> > >> --- > >> drivers/mtd/ubi/block.c | 1 + > >> 1 file changed, 1 insertion(+) > >> > >> diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c > >> index 8457df7ec5af..d3fbda7eae98 100644 > >> --- a/drivers/mtd/ubi/block.c > >> +++ b/drivers/mtd/ubi/block.c > >> @@ -275,6 +275,7 @@ static void ubiblock_do_work(struct work_struct *work) > >> spin_unlock_irq(rq->queue_lock); > >> res = do_ubiblock_request(dev, req); > >> spin_lock_irq(rq->queue_lock); > >> + rq_flush_dcache_pages(req); > >> > >> /* > >> * If we're done with this request, > >> > > In our project's 3.14 tree I added the flush in a slightly different > place, but it looks like your patch would work too: > > https://chromium-review.googlesource.com/#/c/251693/2/drivers/mtd/ubi/block.c Thank you, Kevin. I'll just use your 3.14 backport as it doesn't seem likely that this operation actually requires the rq->queue_lock (and it's already tested!). Just for completeness, I'm attaching the backport below. Cheers, -- Lu�s >From 41e93187e983724944d9c70ddd822cada09004c8 Mon Sep 17 00:00:00 2001 From: Kevin Cernekee <cernekee@chromium.org> Date: Wed, 22 Apr 2015 09:30:53 -0300 Subject: [PATCH] UBI: block: Add missing cache flushes commit 98fb1ffd8154890d7051750e61ff5548c3ee2ab2 upstream. Block drivers are responsible for calling flush_dcache_page() on each BIO request. This operation keeps the I$ coherent with the D$ on architectures that don't have hardware coherency support. Without this flush, random crashes are seen when executing user programs from an ext4 filesystem backed by a ubiblock device. This patch is based on the change implemented in commit 2d4dc890b5c8 ("block: add helpers to run flush_dcache_page() against a bio and a request's pages"). Fixes: 9d54c8a33eec ("UBI: R/O block driver on top of UBI volumes") Signed-off-by: Kevin Cernekee <cernekee@chromium.org> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@imgtec.com> Signed-off-by: Richard Weinberger <richard@nod.at> [ luis: backported to 3.16: used Kevin's backport to 3.14 ] Signed-off-by: Luis Henriques <luis.henriques@canonical.com> --- drivers/mtd/ubi/block.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c index 8457df7ec5af..8b4a182d7cf9 100644 --- a/drivers/mtd/ubi/block.c +++ b/drivers/mtd/ubi/block.c @@ -255,6 +255,7 @@ static int do_ubiblock_request(struct ubiblock *dev, struct request *req) mutex_lock(&dev->dev_mutex); ret = ubiblock_read(dev, bio_data(req->bio), sec, len); mutex_unlock(&dev->dev_mutex); + rq_flush_dcache_pages(req); return ret; } ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-09-29 9:16 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-09-15 14:48 Please add 98fb1ffd8154890d7051750e61ff5548c3ee2ab2 Richard Weinberger 2015-09-28 13:29 ` Luis Henriques 2015-09-28 21:03 ` Richard Weinberger 2015-09-28 21:12 ` Kevin Cernekee 2015-09-29 9:16 ` Luis Henriques
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).