diff options
author | Armin Wolf <W_Armin@gmx.de> | 2024-07-14 01:48:13 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-07-31 13:41:42 +0200 |
commit | e6cd0dc91ef9d24edda553343e64eb6b542c21dd (patch) | |
tree | 171ae675a62cde5387031185999d5a64bdbb69ca /tools/testing/selftests/drivers/net/lib/py/env.py | |
parent | be62f1289df01b7083f9ee5daf2a27d81355d666 (diff) |
eeprom: ee1004: Fix locking issues in ee1004_probe()
Currently, the devres-based management of ee1004_bus_data has
several issues when it comes to locking:
1. It does not call mutex_unlock() before returning an error.
2. When encountering an error, it deadlocks when trying to recursively
lock a mutex.
Fix this by moving the mutex-protected bus data initialization into
a separate function so that devm_add_action_or_reset() is called
without the mutex being held.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Fixes: 55d57ef6fa97 ("eeprom: ee1004: Use devres for bus data cleanup")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240713234813.21746-1-W_Armin@gmx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/drivers/net/lib/py/env.py')
0 files changed, 0 insertions, 0 deletions