This is a note to let you know that I've just added the patch titled dm cache: fix error return code in cache_create to the 3.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: dm-cache-fix-error-return-code-in-cache_create.patch and it can be found in the queue-3.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From fa4d683af3693863bec761e2761a07e4c1351f86 Mon Sep 17 00:00:00 2001 From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx> Date: Fri, 10 May 2013 14:37:14 +0100 Subject: dm cache: fix error return code in cache_create From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx> commit fa4d683af3693863bec761e2761a07e4c1351f86 upstream. Return -ENOMEM if memory allocation fails in cache_create instead of 0 (to avoid NULL pointer dereference). Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx> Signed-off-by: Alasdair G Kergon <agk@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/md/dm-cache-target.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/md/dm-cache-target.c +++ b/drivers/md/dm-cache-target.c @@ -1971,6 +1971,7 @@ static int cache_create(struct cache_arg atomic_set(&cache->nr_migrations, 0); init_waitqueue_head(&cache->migration_wait); + r = -ENOMEM; cache->nr_dirty = 0; cache->dirty_bitset = alloc_bitset(from_cblock(cache->cache_size)); if (!cache->dirty_bitset) { Patches currently in stable-queue which might be from yongjun_wei@xxxxxxxxxxxxxxxxx are queue-3.9/dm-cache-fix-error-return-code-in-cache_create.patch queue-3.9/dm-snapshot-fix-error-return-code-in-snapshot_ctr.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html