aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_timer.c
diff options
context:
space:
mode:
authorVadim Pasternak <[email protected]>2022-08-23 23:19:35 +0300
committerHans de Goede <[email protected]>2022-09-01 14:20:42 +0200
commit52e01c0b1d80b0a7e8d9970456e10b788398e633 (patch)
tree49a548e7abb2ad224fb27c4f9b169eda867c70b8 /net/lapb/lapb_timer.c
parent16b36a953bc7fc4843568abcdb7b32f92cc65457 (diff)
platform/mellanox: mlxreg-lc: Fix locking issue
Fix locking issues: - mlxreg_lc_state_update() takes a lock when set or clear "MLXREG_LC_POWERED". - All the devices can be deleted before MLXREG_LC_POWERED flag is cleared. To fix it: - Add lock() / unlock() at the beginning / end of mlxreg_lc_event_handler() and remove locking from mlxreg_lc_power_on_off() and mlxreg_lc_enable_disable() - Add locked version of mlxreg_lc_state_update() - mlxreg_lc_state_update_locked() for using outside mlxreg_lc_event_handler(). (2) Remove redundant NULL check for of if 'data->notifier'. Fixes: 62f9529b8d5c87b ("platform/mellanox: mlxreg-lc: Add initial support for Nvidia line card devices") Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Vadim Pasternak <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions