mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-20 20:21:30 +00:00
Fix possible crash for INQUIRYs on not existing LUNs
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1829 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -853,10 +853,11 @@ static int scst_set_lun_not_supported_request_sense(struct scst_cmd *cmd,
|
||||
|
||||
sense_len = scst_set_sense(sg_virt(cmd->sg),
|
||||
cmd->bufflen, cmd->cdb[1] & 1, key, asc, ascq);
|
||||
scst_set_resp_data_len(cmd, sense_len);
|
||||
|
||||
TRACE_BUFFER("Sense set", sg_virt(cmd->sg), sense_len);
|
||||
|
||||
scst_set_resp_data_len(cmd, sense_len);
|
||||
|
||||
res = 0;
|
||||
cmd->completed = 1;
|
||||
|
||||
@@ -904,6 +905,8 @@ static int scst_set_lun_not_supported_inquiry(struct scst_cmd *cmd)
|
||||
|
||||
TRACE_BUFFER("INQUIRY for not supported LUN set", buf, len);
|
||||
|
||||
scst_set_resp_data_len(cmd, len);
|
||||
|
||||
res = 0;
|
||||
cmd->completed = 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user