From 19d04ba8a14674ace732db65fc7c6a6367e94854 Mon Sep 17 00:00:00 2001 From: mav Date: Sat, 24 Jan 2015 15:40:52 +0000 Subject: [PATCH] Fix wrong LUN reference in XCOPY block-to-block operation. This could cause data corruption due to accessing wrong LUN in case of retries on write errors. Failed writes were retried to read LUN. MFC after: 3 days --- sys/cam/ctl/ctl_tpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cam/ctl/ctl_tpc.c b/sys/cam/ctl/ctl_tpc.c index 4e67ce14d322..63aee278bb96 100644 --- a/sys/cam/ctl/ctl_tpc.c +++ b/sys/cam/ctl/ctl_tpc.c @@ -916,7 +916,7 @@ tpc_process_b2b(struct tpc_list *list) /*control*/ 0); tiow->io->io_hdr.retries = 3; tiow->lun = dl; - tiow->io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = tior; + tiow->io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = tiow; TAILQ_INSERT_TAIL(&tior->run, tiow, rlinks); TAILQ_INSERT_TAIL(prun, tior, rlinks);