Page MenuHomeFreeBSD

cam: Fix off by one error in ASC/ASCQ lookup
ClosedPublic

Authored by imp on Jan 25 2025, 8:10 PM.
Tags
None
Referenced Files
F115634866: D48685.diff
Sat, Apr 26, 8:11 AM
Unknown Object (File)
Thu, Apr 24, 11:51 PM
Unknown Object (File)
Sun, Apr 6, 1:02 PM
Unknown Object (File)
Mar 23 2025, 6:33 AM
Unknown Object (File)
Mar 2 2025, 8:34 PM
Unknown Object (File)
Feb 27 2025, 3:57 PM
Unknown Object (File)
Feb 20 2025, 11:38 AM
Unknown Object (File)
Feb 14 2025, 4:10 AM
Subscribers
None

Details

Summary

To implement ranges of ASC/ASCQ codes, we set SS_RANGE on an entry with
the entry being the end (highest) of the range (with the prior entry
being the start). When looking up a ASC/ASCQ code, however, we return
the second entry, which just has the range info. Instead, return the
prior entry in these cases so we can print the ASC/ASCQ code string
correctly.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 62028
Build 58912: arc lint + arc unit

Event Timeline

imp requested review of this revision.Jan 25 2025, 8:10 PM
imp added a parent revision: D48684: cam: Fail ASC 0x40.

I've noticed this issue too while looking on the previous patch.

This revision is now accepted and ready to land.Jan 27 2025, 4:05 PM
This revision was automatically updated to reflect the committed changes.