aboutsummaryrefslogtreecommitdiff
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2023-07-10 13:41:27 -0700
committerTony Nguyen <anthony.l.nguyen@intel.com>2023-07-21 08:49:37 -0700
commita2f054c10bef0b54600ec9cb776508443e941343 (patch)
treeaed0f3215c5c3f3aca7900955d38d73481e8fe60 /drivers/cpufreq
parent043b1f185fb0f3939b7427f634787706f45411c4 (diff)
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 <jacob.e.keller@intel.com> Tested-by: Rafal Romanowski <rafal.romanowski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/cpufreq')
0 files changed, 0 insertions, 0 deletions