mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
scst_event: Fix the code that copies the CDB of the command to be aborted
I came across this accidentally while looking up the users of the
cmd_to_abort pointer.
Fixes: 297d268a7a ("SCST events infrastructure"; r6574)
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9230 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -472,8 +472,9 @@ int scst_event_queue_tm_fn_received(struct scst_mgmt_cmd *mcmd)
|
||||
sizeof(payload->session_sysfs_name));
|
||||
if (mcmd->cmd_to_abort != NULL) {
|
||||
payload->cmd_to_abort_tag = mcmd->cmd_to_abort->tag;
|
||||
strlcpy(payload->cdb, mcmd->cmd_to_abort->cdb,
|
||||
sizeof(payload->cdb));
|
||||
memcpy(payload->cdb, mcmd->cmd_to_abort->cdb,
|
||||
min_t(u32, mcmd->cmd_to_abort->cdb_len,
|
||||
sizeof(payload->cdb)));
|
||||
}
|
||||
|
||||
scst_event_queue(SCST_EVENT_TM_FN_RECEIVED,
|
||||
|
||||
Reference in New Issue
Block a user