提交 f5908267 编写于 作者: H Herbert Xu

hwrng: core - Fix double unlock in rng_dev_read

When the loop terminates with size == 0 in rng_dev_read we will
unlock the rng mutex twice.
Reported-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 55639353
......@@ -158,10 +158,11 @@ static ssize_t rng_dev_read(struct file *filp, char __user *buf,
goto out;
}
}
out_unlock:
mutex_unlock(&rng_mutex);
out:
return ret ? : err;
out_unlock:
mutex_unlock(&rng_mutex);
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册