summaryrefslogtreecommitdiffstats
path: root/tapset/scsi.stp
diff options
context:
space:
mode:
Diffstat (limited to 'tapset/scsi.stp')
-rw-r--r--tapset/scsi.stp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tapset/scsi.stp b/tapset/scsi.stp
index 23256893..5e467686 100644
--- a/tapset/scsi.stp
+++ b/tapset/scsi.stp
@@ -77,12 +77,13 @@ probe scsi.iocompleted
function scsi_timer_pending:long(var:long)
%{
struct scsi_cmnd *cmd = (struct scsi_cmnd *)((long)THIS->var);
- THIS->__retvalue = timer_pending(&cmd->eh_timeout);
+ THIS->__retvalue = timer_pending(&cmd->eh_timeout); /* FIXME: deref hazard! */
%}
function get_devstate_from_req:long(var:long)
%{
struct request_queue *q = (struct request_queue *)((long)THIS->var);
- struct scsi_device *sdev = (struct scsi_device *)(q->queuedata);
- THIS->__retvalue = sdev->sdev_state;
+ struct scsi_device *sdev = (struct scsi_device *)kread(&(q->queuedata));
+ THIS->__retvalue = kread(&(sdev->sdev_state));
+ CATCH_DEREF_FAULT();
%}