From 260c6cb1f8acb6cbacb053c7789dbc04bd8ec5e4 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Fri, 13 Jul 2012 21:39:30 +0000 Subject: [PATCH] Fix incorrect completion function dereference. Reported by Thomas Lau git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4404 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 3cc5a5a93..293f35cf7 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -4846,7 +4846,7 @@ int scst_finish_internal_cmd(struct scst_cmd *cmd) if (cmd->cdb[0] == REQUEST_SENSE) scst_complete_request_sense(cmd); else { - scst_i_finish_fn_t f = cmd->tgt_i_priv; + scst_i_finish_fn_t f = (void *) *((unsigned long long **)cmd->tgt_i_priv); f(cmd); }