Messages in this thread Patch in this message | | | From | (Krzysztof Hałasa) | Date | Thu, 18 Sep 2014 15:12:02 +0200 | Subject | [PATCH] Fix unbalanced mutex in dma_pool_create(). |
| |
dma_pool_create() needs to unlock the mutex in error case. The bug has been present starting with v3.16-rc1 (cc6b664a).
Signed-off-by: Krzysztof Hałasa <khc@piap.pl> Cc: stable@vger.kernel.org
--- a/mm/dmapool.c +++ b/mm/dmapool.c @@ -174,11 +174,11 @@ struct dma_pool *dma_pool_create(const char *name, struct device *dev, mutex_lock(&pools_lock); if (list_empty(&dev->dma_pools) && device_create_file(dev, &dev_attr_pools)) { kfree(retval); - return NULL; + retval = NULL; } else list_add(&retval->pools, &dev->dma_pools); mutex_unlock(&pools_lock); return retval; -- Krzysztof Halasa
Research Institute for Automation and Measurements PIAP Al. Jerozolimskie 202, 02-486 Warsaw, Poland -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |