Page MenuHomeFreeBSD

Initialize a stack variable in mprsas_get_sas_address_for_sata_disk
ClosedPublic

Authored by asomers on Jan 27 2017, 10:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 7 2024, 8:04 PM
Unknown Object (File)
Dec 22 2023, 5:38 PM
Unknown Object (File)
Dec 20 2023, 2:53 AM
Unknown Object (File)
Nov 25 2023, 9:02 PM
Unknown Object (File)
Nov 13 2023, 5:18 PM
Unknown Object (File)
Nov 9 2023, 10:50 PM
Unknown Object (File)
Nov 9 2023, 8:36 AM
Unknown Object (File)
Oct 24 2023, 10:15 PM
Subscribers

Details

Summary

Initialize a stack variable in mprsas_get_sas_address_for_sata_disk

Thought it's difficult to reproduce, I think this variable was responsible
for a use-after-free panic when a SATA disk times out responding to a SATA
identify command during boot.

Submitted by: slm

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 7060
Build 7239: arc lint + arc unit

Event Timeline

asomers retitled this revision from to Initialize a stack variable in mprsas_get_sas_address_for_sata_disk.
asomers updated this object.
asomers edited the test plan for this revision. (Show Details)
asomers added a reviewer: slm.
sys/dev/mpr/mpr_sas_lsi.c
930

@slm Is this debug message to your liking? I don't want to commit it if it isn't exactly what you want.

sys/dev/mpr/mpr_sas_lsi.c
930

You shouldn't really need to print this message because mprsas_get_sata_identify will print a message already if there is a problem. You can see this message in your issue, "... request for page completed with error...". And, in fact, ioc_status and sas_status will not show anything useful if there is no reply.

sys/dev/mpr/mpr_sas_lsi.c
930

I only added this because you asked for something like it in your email dated Jan-24. Do you want something different? Or should I just remove it?

sys/dev/mpr/mpr_sas_lsi.c
930

Oh, sorry. I only meant for you to add that for your own debugging purposes so that we could narrow down where the problem was. Now that we know that mpi_reply is not 0'd out, I think that's all we need and you can remove the print.

asomers edited edge metadata.

Remove debugging printf

slm edited edge metadata.
This revision is now accepted and ready to land.Jan 30 2017, 7:05 PM
This revision was automatically updated to reflect the committed changes.