mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
scsi: megaraid_sas: Protect megasas_get_ctrl_info() in megasas_resume()
Protect the megasas_get_ctrl_info() call in megasas_resume() with
instance->reset_mutex using scoped_guard().
megasas_get_ctrl_info() may release and reacquire instance->reset_mutex.
Hence, calling this function without holding instance->reset_mutex is not
safe.
Fixes: c3b10a55ab ("scsi: megaraid_sas: Update controller info during resume")
Cc: Kashyap Desai <[email protected]>
Cc: Sumit Saxena <[email protected]>
Cc: Shivasharan S <[email protected]>
Cc: Chandrakanth patil <[email protected]>
Signed-off-by: Bart Van Assche <[email protected]>
Link: https://patch.msgid.link/f06b5ee432b21cf293f0663e15b64f75a84b9fd5.1788204406.git.bvanassche@acm.org
Signed-off-by: Martin K. Petersen (Oracle) <[email protected]>
This commit is contained in:
1 parent
b6ec0f7974
commit
42d1221d32
1 file changed
+3
-1
@@ -7886,7 +7886,9 @@ megasas_resume(struct device *dev)
|
||||
goto fail_init_mfi;
|
||||
}
|
||||
|
||||
if (megasas_get_ctrl_info(instance) != DCMD_SUCCESS)
|
||||
scoped_guard(mutex, &instance->reset_mutex)
|
||||
rval = megasas_get_ctrl_info(instance);
|
||||
if (rval != DCMD_SUCCESS)
|
||||
goto fail_init_mfi;
|
||||
|
||||
tasklet_init(&instance->isr_tasklet, instance->instancet->tasklet,
|
||||
|
||||
Reference in new issue
Block a user