aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMarek Vasut <[email protected]>2021-12-20 20:50:22 +0100
committerHerbert Xu <[email protected]>2021-12-31 18:10:55 +1100
commit29009604ad4e3ef784fd9b9fef6f23610ddf633d (patch)
tree57a7bbbaac153e5a419562245f509b9b9aac567a /tools/perf/scripts/python
parentdb1eafb8c512f53c4b0e8673b5a89f9ad14de4fe (diff)
crypto: stm32/crc32 - Fix kernel BUG triggered in probe()
The include/linux/crypto.h struct crypto_alg field cra_driver_name description states "Unique name of the transformation provider. " ... " this contains the name of the chip or provider and the name of the transformation algorithm." In case of the stm32-crc driver, field cra_driver_name is identical for all registered transformation providers and set to the name of the driver itself, which is incorrect. This patch fixes it by assigning a unique cra_driver_name to each registered transformation provider. The kernel crash is triggered when the driver calls crypto_register_shashes() which calls crypto_register_shash(), which calls crypto_register_alg(), which calls __crypto_register_alg(), which returns -EEXIST, which is propagated back through this call chain. Upon -EEXIST from crypto_register_shash(), the crypto_register_shashes() starts unregistering the providers back, and calls crypto_unregister_shash(), which calls crypto_unregister_alg(), and this is where the BUG() triggers due to incorrect cra_refcnt. Fixes: b51dbe90912a ("crypto: stm32 - Support for STM32 CRC32 crypto module") Signed-off-by: Marek Vasut <[email protected]> Cc: <[email protected]> # 4.12+ Cc: Alexandre Torgue <[email protected]> Cc: Fabien Dessenne <[email protected]> Cc: Herbert Xu <[email protected]> Cc: Lionel Debieve <[email protected]> Cc: Nicolas Toromanoff <[email protected]> Cc: [email protected] Cc: [email protected] To: [email protected] Acked-by: Nicolas Toromanoff <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions