Skip to content

RFC megaraid: fix illegal pointer dereference in complete_cmd_fusion

chengkaitao linux-scsi lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2megaraid: Fix the issue of erroneous reset of Words in reply_descdrivers/scsi/megaraid/megaraid_sas_fusion.c+7 -00 replies
2/2megaraid: replacing fusion->busy_mq_poll[*] with irq_context->in_used in megasas_blk_mq_polldrivers/scsi/megaraid/megaraid_sas_fusion.c drivers/scsi/megaraid/megaraid_sas_fusion.h+3 -100 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC RESEND 0/2] megaraid: fix illegal pointer dereference in complete_cmd_fusion

From: Chengkaitao <[email protected]>

We have encountered several instances of null pointer dereferences in the complete_cmd_fusion function. The root cause was consistently the reply_desc->SMID being erroneously set to 0xffff, resulting in an invalid cmd_fusion pointer retrieval.

After code review, I suspect synchronization issues in complete_cmd- _fusion. However, due to the low reproducibility rate of this problem, I could not perform effective validation. I propose the patch for kernel community discussion to explore better solutions.

Chengkaitao (2):
megaraid: Fix the issue of erroneous reset of Words in reply_desc
megaraid: replacing fusion->busy_mq_poll[*] with irq_context->in_used
in megasas_blk_mq_poll

 drivers/scsi/megaraid/megaraid_sas_fusion.c | 18 ++++++++++--------
 drivers/scsi/megaraid/megaraid_sas_fusion.h |  2 --
 2 files changed, 10 insertions(+), 10 deletions(-)
Signature · 1 line
2.50.1 (Apple Git-155)