* [PATCH] bcache: Make sure to pass GFP_WAIT to mempool_alloc()
@ 2015-01-15 16:26 Gabriel de Perthuis
2015-01-15 18:35 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Gabriel de Perthuis @ 2015-01-15 16:26 UTC (permalink / raw)
To: stable; +Cc: bcache
this was very wrong - mempool_alloc() only guarantees success with GFP_WAIT.
bcache uses GFP_NOWAIT in various other places where we have a fallback,
circuits must've gotten crossed when writing this code or something.
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
---
The bug was introduced in v3.11, fixed in v3.17.
Jens mentioned bcache has many stable@ candidates previously:
https://lkml.org/lkml/2014/9/5/360
I'm cherry-picking this fix because I was getting crashes.
---
drivers/md/bcache/btree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
index 9dd9f1c..e538d45 100644
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@ -200,11 +200,11 @@ void bch_btree_node_read_done(struct btree *b)
{
const char *err = "bad btree header";
struct bset *i = btree_bset_first(b);
struct btree_iter *iter;
- iter = mempool_alloc(b->c->fill_iter, GFP_NOWAIT);
+ iter = mempool_alloc(b->c->fill_iter, GFP_NOIO);
iter->size = b->c->sb.bucket_size / b->c->sb.block_size;
iter->used = 0;
#ifdef CONFIG_BCACHE_DEBUG
iter->b = &b->keys;
--
2.2.0.71.g3365589
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bcache: Make sure to pass GFP_WAIT to mempool_alloc()
2015-01-15 16:26 [PATCH] bcache: Make sure to pass GFP_WAIT to mempool_alloc() Gabriel de Perthuis
@ 2015-01-15 18:35 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2015-01-15 18:35 UTC (permalink / raw)
To: Gabriel de Perthuis; +Cc: stable, bcache
On Thu, Jan 15, 2015 at 05:26:37PM +0100, Gabriel de Perthuis wrote:
> this was very wrong - mempool_alloc() only guarantees success with GFP_WAIT.
> bcache uses GFP_NOWAIT in various other places where we have a fallback,
> circuits must've gotten crossed when writing this code or something.
>
> Signed-off-by: Kent Overstreet <kmo@daterainc.com>
> ---
>
> The bug was introduced in v3.11, fixed in v3.17.
>
> Jens mentioned bcache has many stable@ candidates previously:
> https://lkml.org/lkml/2014/9/5/360
>
> I'm cherry-picking this fix because I was getting crashes.
>
> ---
> drivers/md/bcache/btree.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
What exactly is the commit id for this in Linus's tree?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-15 18:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-15 16:26 [PATCH] bcache: Make sure to pass GFP_WAIT to mempool_alloc() Gabriel de Perthuis
2015-01-15 18:35 ` Greg KH
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).