[Devel] [PATCH rh7] tcache: fix BUG at mm/tcache.c:421
Vladimir Davydov
vdavydov at parallels.com
Fri Jul 3 02:30:30 PDT 2015
On Wed, Jul 01, 2015 at 12:55:01PM +0300, Vladimir Davydov wrote:
> diff --git a/mm/tcache.c b/mm/tcache.c
> index e83ad05da944..b70fbaeab926 100644
> --- a/mm/tcache.c
> +++ b/mm/tcache.c
> @@ -418,7 +418,6 @@ retry:
>
> if (node) {
> BUG_ON(node->pool != pool);
> - BUG_ON(node->invalidated);
> if (node != new_node)
> kfree(new_node);
> return node;
> @@ -866,6 +865,10 @@ static int tcache_cleancache_get_page(int pool_id,
> node = tcache_get_node_and_pool(pool_id, &key, false);
> if (node) {
> cache_page = tcache_detach_page(node, index);
> + if (unlikely(node->invalidated)) {
> + put_page(cache_page);
Oops, if cache_page is NULL we will panic.
Drop this patch. Will send v2 soon.
> + cache_page = NULL;
> + }
> tcache_put_node_and_pool(node);
> }
>
> --
> 2.1.4
>
More information about the Devel
mailing list