On Thu, 30 Jan 2014, Vladimir Davydov wrote: > Signed-off-by: Vladimir Davydov <vdavydov@xxxxxxxxxxxxx> Some changelog would be helpful since this fixes an issue already in Linus's tree. Commit 842e2873697e ("memcg: get rid of kmem_cache_dup()") introduced a mutex for memcg_create_kmem_cache() to protect the tmp_name buffer that holds the memcg name. It failed to unlock the mutex if this buffer could not be allocated. This patch fixes the issue by appropriately unlocking the mutex if the allocation fails. Acked-by: David Rientjes <rientjes@xxxxxxxxxx> That said, this tmp_name stuff seems totally unnecessary. kmem_cache_create_memcg() already does the kstrdup() so why not just pass in a pointer to already allocated memory for s->name rather than having this mutex or global buffer at all? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>