diff options
| author | Mike Christie <[email protected]> | 2020-07-01 20:43:19 -0500 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2020-07-08 00:14:34 -0400 |
| commit | f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039 (patch) | |
| tree | a56541b1b169c445b7770687e099af536ab46e99 /tools/perf/scripts/python/flamegraph.py | |
| parent | 3c006c7d23aac928279f7cbe83bbac4361255d53 (diff) | |
scsi: target: Fix crash during SPEC_I_PT handling
__core_scsi3_add_registration clears the t10_pr_registration pr_reg_deve
and does a core_scsi3_lunacl_undepend_item which does an undepend and also
does a kref_put from the get done in __core_scsi3_alloc_registration. So
when we get to the bottom of core_scsi3_decode_spec_i_port the pr_reg_deve
is NULL and we crash when trying to access the local_pr_reg's pr_reg_deve.
We've also done an extra undepend for local_pr_reg and if we didn't crash
on the NULL we would have done an extra kref_put too.
This patch has us do a core_scsi3_lunacl_depend_item for local_pr_reg and
then let __core_scsi3_add_registration handle the cleanup for the
pr_reg_deve. We then just skip the undepend for the acl and tpg for the
local pr_reg.
The error path then works in a similar way, but we always do the
core_scsi3_lunacl_undepend_item since we never call
__core_scsi3_add_registration in that code path.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mike Christie <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions