mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
Fix unbalanced mutex in dma_pool_create().
dma_pool_create() needs to unlock the mutex in error case. The bug was
introduced in the 3.16 by commit cc6b664aa2 ("mm/dmapool.c: remove
redundant NULL check for dev in dma_pool_create()")/
Signed-off-by: Krzysztof Hałasa <[email protected]>
Cc: [email protected] # v3.16
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
bd26a74e93
commit
153a9f131f
1 file changed
+1
-1
+1
-1
@@ -176,7 +176,7 @@ struct dma_pool *dma_pool_create(const char *name, struct device *dev,
|
||||
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);
|
||||
|
||||
Reference in new issue
Block a user