Commit b1b3440
scsi: lpfc: Resolve NULL ptr dereference after an ELS LOGO is aborted
A use-after-free crash can occur after an ELS LOGO is aborted.
Specifically, a nodelist structure is freed and then
ndlp->vport->cfg_log_verbose is dereferenced in lpfc_nlp_get() when the
discovery state machine is mistakenly called a second time with
NLP_EVT_DEVICE_RM argument.
Rework lpfc_cmpl_els_logo() to prevent the duplicate calls to release a
nodelist structure.
Link: https://lore.kernel.org/r/20220603174329.63777-6-jsmart2021@gmail.com
Co-developed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent 6f808bd commit b1b3440
1 file changed
Lines changed: 9 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2998 | 2998 | | |
2999 | 2999 | | |
3000 | 3000 | | |
3001 | | - | |
3002 | 3001 | | |
3003 | | - | |
3004 | | - | |
3005 | 3002 | | |
3006 | 3003 | | |
3007 | 3004 | | |
| |||
3021 | 3018 | | |
3022 | 3019 | | |
3023 | 3020 | | |
3024 | | - | |
3025 | | - | |
3026 | | - | |
3027 | | - | |
3028 | | - | |
| 3021 | + | |
3029 | 3022 | | |
3030 | 3023 | | |
3031 | 3024 | | |
3032 | | - | |
3033 | | - | |
3034 | | - | |
3035 | | - | |
3036 | 3025 | | |
3037 | 3026 | | |
3038 | 3027 | | |
| |||
3059 | 3048 | | |
3060 | 3049 | | |
3061 | 3050 | | |
| 3051 | + | |
| 3052 | + | |
| 3053 | + | |
| 3054 | + | |
3062 | 3055 | | |
3063 | 3056 | | |
3064 | 3057 | | |
| |||
3075 | 3068 | | |
3076 | 3069 | | |
3077 | 3070 | | |
| 3071 | + | |
| 3072 | + | |
| 3073 | + | |
| 3074 | + | |
3078 | 3075 | | |
3079 | 3076 | | |
3080 | 3077 | | |
| |||
0 commit comments