]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
CAM: Keep periph_links when restoring CCB in camperiphdone().
authorAlexander Motin <mav@FreeBSD.org>
Thu, 28 Apr 2022 01:39:50 +0000 (21:39 -0400)
committerMark Johnston <markj@FreeBSD.org>
Mon, 25 Jul 2022 21:00:19 +0000 (17:00 -0400)
commitdb8082886fd8cfbd8a3d533bb530ad392d0c4d85
treec7f8fadc56c8f84a395bb571db12aff0f51fffea
parentfc952ac2212b121aa6eefc273f5960ec3e0a466d
CAM: Keep periph_links when restoring CCB in camperiphdone().

While recovery command executed, some other commands from the periph
may complete, that may affect periph_links of this CCB.  So restoring
original CCB we must keep current periph_links as more up to date.

I've found this triggering assertions with debug kernel and suspect
some memory corruptions otherwise when spun down disk receives two
or sometimes more concurrent requests.

Approved by: so
Security: FreeBSD-EN22:17.cam
MFC after: 1 week
Sponsored by: iXsystems, Inc.

(cherry picked from commit 404f001161b975164d8b52d9f404d07ac7584027)
(cherry picked from commit 84849cfd1dc016917402511bc5a55d3d7317ce39)
sys/cam/cam_periph.c