提交 303dfbf5 编写于 作者: A Alexey Khoroshilov 提交者: Greg Kroah-Hartman

staging: mei: unlock dev->device_lock mutex on error path in mei_open()

mei_open() acquires dev->device_lock mutex and try to allocate mei_cl,
but if the allocation fails it goes to return statement. As a result
dev->device_lock left locked.

The patch fixes goto to unlock dev->device_lock mutex on this path.

Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 17966e3b
......@@ -413,7 +413,7 @@ static int mei_open(struct inode *inode, struct file *file)
err = -ENOMEM;
cl = mei_cl_allocate(dev);
if (!cl)
goto out;
goto out_unlock;
err = -ENODEV;
if (dev->mei_state != MEI_ENABLED) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册