linux/drivers/crypto/hisilicon
Chenghai Huang 0a6e038f0c crypto: hisilicon - Adjust debugfs creation and release order
There is a scenario where the file directory is created but the
file memory is not set. In this case, if a user accesses the
file, an error occurs.

So during the creation process of debugfs, memory should be
allocated first before creating the directory. In the release
process, the directory should be deleted first before releasing
the memory to avoid the situation where the memory does not
exist when accessing the directory.

In addition, the directory released by the debugfs is a global
variable. When the debugfs of an accelerator fails to be
initialized, releasing the directory of the global variable
affects the debugfs initialization of other accelerators.
The debugfs root directory released by debugfs init should be a
member of qm, not a global variable.

Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2024-04-12 15:07:53 +08:00
..
hpre crypto: hisilicon - Adjust debugfs creation and release order 2024-04-12 15:07:53 +08:00
sec crypto: hisilicon/sec - Convert to platform remove callback returning void 2023-10-27 18:04:26 +08:00
sec2 crypto: hisilicon - Adjust debugfs creation and release order 2024-04-12 15:07:53 +08:00
trng crypto: hisilicon/trng - Convert to platform remove callback returning void 2023-10-27 18:04:26 +08:00
zip crypto: hisilicon - Adjust debugfs creation and release order 2024-04-12 15:07:53 +08:00
debugfs.c crypto: hisilicon/debugfs - Fix the processing logic issue in the debugfs creation 2024-04-12 15:07:52 +08:00
Kconfig hwrng: histb - Move driver to drivers/char/hw_random/histb-rng.c 2023-05-12 18:48:01 +08:00
Makefile hwrng: histb - Move driver to drivers/char/hw_random/histb-rng.c 2023-05-12 18:48:01 +08:00
qm_common.h crypto: hisilicon/qm - simplify the status of qm 2023-12-01 18:03:26 +08:00
qm.c crypto: hisilicon/qm - Add the default processing branch 2024-04-12 15:07:52 +08:00
sgl.c crypto: hisilicon/sgl - Delete redundant parameter verification 2024-04-12 15:07:52 +08:00