diff options
| author | Jacob Keller <[email protected]> | 2023-07-10 20:41:27 +0000 |
|---|---|---|
| committer | Tony Nguyen <[email protected]> | 2023-07-21 15:49:37 +0000 |
| commit | a2f054c10bef0b54600ec9cb776508443e941343 (patch) | |
| tree | aed0f3215c5c3f3aca7900955d38d73481e8fe60 /rust/helpers.c | |
| parent | i40e: Fix an NULL vs IS_ERR() bug for debugfs_create_dir() (diff) | |
| download | kernel-a2f054c10bef0b54600ec9cb776508443e941343.tar.gz kernel-a2f054c10bef0b54600ec9cb776508443e941343.zip | |
iavf: fix potential deadlock on allocation failure
In iavf_adminq_task(), if kzalloc() fails to allocate the event.msg_buf,
the function will exit without releasing the adapter->crit_lock.
This is unlikely, but if it happens, the next access to that mutex will
deadlock.
Fix this by moving the unlock to the end of the function, and adding a new
label to allow jumping to the unlock portion of the function exit flow.
Fixes: fc2e6b3b132a ("iavf: Rework mutexes for better synchronisation")
Signed-off-by: Jacob Keller <[email protected]>
Tested-by: Rafal Romanowski <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'rust/helpers.c')
0 files changed, 0 insertions, 0 deletions
