aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2015-01-08 01:43:50 -0500
committerChristoph Hellwig <hch@lst.de>2015-01-09 09:44:33 -0500
commit470613b462a767aa8cca1e590928fcbc55bf39e5 (patch)
treee0077562fd5dafc9c822f5034fd775aad267e28d /drivers/scsi
parenta4a6afb477a9e724a6ff7204e4199f0c2cd97d6a (diff)
scsi: do not display kernel pointer in message logs
It is not good practice to display the kernel pointer in any message logs, and it doesn't display any additional information. And as we know have block-layer assigned tags we can use them to differentiate the messages. So remove any pointer references from the displayed messages. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/scsi_error.c49
1 files changed, 20 insertions, 29 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 9ac9eb13d2f3..4cdaffca17fc 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -124,41 +124,37 @@ scmd_eh_abort_handler(struct work_struct *work)
124 if (scsi_host_eh_past_deadline(sdev->host)) { 124 if (scsi_host_eh_past_deadline(sdev->host)) {
125 SCSI_LOG_ERROR_RECOVERY(3, 125 SCSI_LOG_ERROR_RECOVERY(3,
126 scmd_printk(KERN_INFO, scmd, 126 scmd_printk(KERN_INFO, scmd,
127 "scmd %p eh timeout, not aborting\n", 127 "eh timeout, not aborting\n"));
128 scmd));
129 } else { 128 } else {
130 SCSI_LOG_ERROR_RECOVERY(3, 129 SCSI_LOG_ERROR_RECOVERY(3,
131 scmd_printk(KERN_INFO, scmd, 130 scmd_printk(KERN_INFO, scmd,
132 "aborting command %p\n", scmd)); 131 "aborting command\n"));
133 rtn = scsi_try_to_abort_cmd(sdev->host->hostt, scmd); 132 rtn = scsi_try_to_abort_cmd(sdev->host->hostt, scmd);
134 if (rtn == SUCCESS) { 133 if (rtn == SUCCESS) {
135 set_host_byte(scmd, DID_TIME_OUT); 134 set_host_byte(scmd, DID_TIME_OUT);
136 if (scsi_host_eh_past_deadline(sdev->host)) { 135 if (scsi_host_eh_past_deadline(sdev->host)) {
137 SCSI_LOG_ERROR_RECOVERY(3, 136 SCSI_LOG_ERROR_RECOVERY(3,
138 scmd_printk(KERN_INFO, scmd, 137 scmd_printk(KERN_INFO, scmd,
139 "scmd %p eh timeout, " 138 "eh timeout, not retrying "
140 "not retrying aborted " 139 "aborted command\n"));
141 "command\n", scmd));
142 } else if (!scsi_noretry_cmd(scmd) && 140 } else if (!scsi_noretry_cmd(scmd) &&
143 (++scmd->retries <= scmd->allowed)) { 141 (++scmd->retries <= scmd->allowed)) {
144 SCSI_LOG_ERROR_RECOVERY(3, 142 SCSI_LOG_ERROR_RECOVERY(3,
145 scmd_printk(KERN_WARNING, scmd, 143 scmd_printk(KERN_WARNING, scmd,
146 "scmd %p retry " 144 "retry aborted command\n"));
147 "aborted command\n", scmd));
148 scsi_queue_insert(scmd, SCSI_MLQUEUE_EH_RETRY); 145 scsi_queue_insert(scmd, SCSI_MLQUEUE_EH_RETRY);
149 return; 146 return;
150 } else { 147 } else {
151 SCSI_LOG_ERROR_RECOVERY(3, 148 SCSI_LOG_ERROR_RECOVERY(3,
152 scmd_printk(KERN_WARNING, scmd, 149 scmd_printk(KERN_WARNING, scmd,
153 "scmd %p finish " 150 "finish aborted command\n"));
154 "aborted command\n", scmd));
155 scsi_finish_command(scmd); 151 scsi_finish_command(scmd);
156 return; 152 return;
157 } 153 }
158 } else { 154 } else {
159 SCSI_LOG_ERROR_RECOVERY(3, 155 SCSI_LOG_ERROR_RECOVERY(3,
160 scmd_printk(KERN_INFO, scmd, 156 scmd_printk(KERN_INFO, scmd,
161 "scmd %p abort %s\n", scmd, 157 "cmd abort %s\n",
162 (rtn == FAST_IO_FAIL) ? 158 (rtn == FAST_IO_FAIL) ?
163 "not send" : "failed")); 159 "not send" : "failed"));
164 } 160 }
@@ -167,8 +163,7 @@ scmd_eh_abort_handler(struct work_struct *work)
167 if (!scsi_eh_scmd_add(scmd, 0)) { 163 if (!scsi_eh_scmd_add(scmd, 0)) {
168 SCSI_LOG_ERROR_RECOVERY(3, 164 SCSI_LOG_ERROR_RECOVERY(3,
169 scmd_printk(KERN_WARNING, scmd, 165 scmd_printk(KERN_WARNING, scmd,
170 "scmd %p terminate " 166 "terminate aborted command\n"));
171 "aborted command\n", scmd));
172 set_host_byte(scmd, DID_TIME_OUT); 167 set_host_byte(scmd, DID_TIME_OUT);
173 scsi_finish_command(scmd); 168 scsi_finish_command(scmd);
174 } 169 }
@@ -194,7 +189,7 @@ scsi_abort_command(struct scsi_cmnd *scmd)
194 scmd->eh_eflags &= ~SCSI_EH_ABORT_SCHEDULED; 189 scmd->eh_eflags &= ~SCSI_EH_ABORT_SCHEDULED;
195 SCSI_LOG_ERROR_RECOVERY(3, 190 SCSI_LOG_ERROR_RECOVERY(3,
196 scmd_printk(KERN_INFO, scmd, 191 scmd_printk(KERN_INFO, scmd,
197 "scmd %p previous abort failed\n", scmd)); 192 "previous abort failed\n"));
198 BUG_ON(delayed_work_pending(&scmd->abort_work)); 193 BUG_ON(delayed_work_pending(&scmd->abort_work));
199 return FAILED; 194 return FAILED;
200 } 195 }
@@ -208,8 +203,7 @@ scsi_abort_command(struct scsi_cmnd *scmd)
208 spin_unlock_irqrestore(shost->host_lock, flags); 203 spin_unlock_irqrestore(shost->host_lock, flags);
209 SCSI_LOG_ERROR_RECOVERY(3, 204 SCSI_LOG_ERROR_RECOVERY(3,
210 scmd_printk(KERN_INFO, scmd, 205 scmd_printk(KERN_INFO, scmd,
211 "scmd %p not aborting, host in recovery\n", 206 "not aborting, host in recovery\n"));
212 scmd));
213 return FAILED; 207 return FAILED;
214 } 208 }
215 209
@@ -219,8 +213,7 @@ scsi_abort_command(struct scsi_cmnd *scmd)
219 213
220 scmd->eh_eflags |= SCSI_EH_ABORT_SCHEDULED; 214 scmd->eh_eflags |= SCSI_EH_ABORT_SCHEDULED;
221 SCSI_LOG_ERROR_RECOVERY(3, 215 SCSI_LOG_ERROR_RECOVERY(3,
222 scmd_printk(KERN_INFO, scmd, 216 scmd_printk(KERN_INFO, scmd, "abort scheduled\n"));
223 "scmd %p abort scheduled\n", scmd));
224 queue_delayed_work(shost->tmf_work_q, &scmd->abort_work, HZ / 100); 217 queue_delayed_work(shost->tmf_work_q, &scmd->abort_work, HZ / 100);
225 return SUCCESS; 218 return SUCCESS;
226} 219}
@@ -737,8 +730,7 @@ static void scsi_eh_done(struct scsi_cmnd *scmd)
737 struct completion *eh_action; 730 struct completion *eh_action;
738 731
739 SCSI_LOG_ERROR_RECOVERY(3, scmd_printk(KERN_INFO, scmd, 732 SCSI_LOG_ERROR_RECOVERY(3, scmd_printk(KERN_INFO, scmd,
740 "%s scmd: %p result: %x\n", 733 "%s result: %x\n", __func__, scmd->result));
741 __func__, scmd, scmd->result));
742 734
743 eh_action = scmd->device->host->eh_action; 735 eh_action = scmd->device->host->eh_action;
744 if (eh_action) 736 if (eh_action)
@@ -1053,8 +1045,8 @@ retry:
1053 scsi_log_completion(scmd, rtn); 1045 scsi_log_completion(scmd, rtn);
1054 1046
1055 SCSI_LOG_ERROR_RECOVERY(3, scmd_printk(KERN_INFO, scmd, 1047 SCSI_LOG_ERROR_RECOVERY(3, scmd_printk(KERN_INFO, scmd,
1056 "%s: scmd: %p, timeleft: %ld\n", 1048 "%s timeleft: %ld\n",
1057 __func__, scmd, timeleft)); 1049 __func__, timeleft));
1058 1050
1059 /* 1051 /*
1060 * If there is time left scsi_eh_done got called, and we will examine 1052 * If there is time left scsi_eh_done got called, and we will examine
@@ -1193,8 +1185,7 @@ int scsi_eh_get_sense(struct list_head *work_q,
1193 continue; 1185 continue;
1194 1186
1195 SCSI_LOG_ERROR_RECOVERY(3, scmd_printk(KERN_INFO, scmd, 1187 SCSI_LOG_ERROR_RECOVERY(3, scmd_printk(KERN_INFO, scmd,
1196 "sense requested for %p result %x\n", 1188 "sense requested, result %x\n", scmd->result));
1197 scmd, scmd->result));
1198 SCSI_LOG_ERROR_RECOVERY(3, scsi_print_sense(scmd)); 1189 SCSI_LOG_ERROR_RECOVERY(3, scsi_print_sense(scmd));
1199 1190
1200 rtn = scsi_decide_disposition(scmd); 1191 rtn = scsi_decide_disposition(scmd);
@@ -1236,7 +1227,7 @@ retry_tur:
1236 scmd->device->eh_timeout, 0); 1227 scmd->device->eh_timeout, 0);
1237 1228
1238 SCSI_LOG_ERROR_RECOVERY(3, scmd_printk(KERN_INFO, scmd, 1229 SCSI_LOG_ERROR_RECOVERY(3, scmd_printk(KERN_INFO, scmd,
1239 "%s: scmd %p rtn %x\n", __func__, scmd, rtn)); 1230 "%s return: %x\n", __func__, rtn));
1240 1231
1241 switch (rtn) { 1232 switch (rtn) {
1242 case NEEDS_RETRY: 1233 case NEEDS_RETRY:
@@ -2093,8 +2084,8 @@ void scsi_eh_flush_done_q(struct list_head *done_q)
2093 (++scmd->retries <= scmd->allowed)) { 2084 (++scmd->retries <= scmd->allowed)) {
2094 SCSI_LOG_ERROR_RECOVERY(3, 2085 SCSI_LOG_ERROR_RECOVERY(3,
2095 scmd_printk(KERN_INFO, scmd, 2086 scmd_printk(KERN_INFO, scmd,
2096 "%s: flush retry cmd: %p\n", 2087 "%s: flush retry cmd\n",
2097 current->comm, scmd)); 2088 current->comm));
2098 scsi_queue_insert(scmd, SCSI_MLQUEUE_EH_RETRY); 2089 scsi_queue_insert(scmd, SCSI_MLQUEUE_EH_RETRY);
2099 } else { 2090 } else {
2100 /* 2091 /*
@@ -2106,8 +2097,8 @@ void scsi_eh_flush_done_q(struct list_head *done_q)
2106 scmd->result |= (DRIVER_TIMEOUT << 24); 2097 scmd->result |= (DRIVER_TIMEOUT << 24);
2107 SCSI_LOG_ERROR_RECOVERY(3, 2098 SCSI_LOG_ERROR_RECOVERY(3,
2108 scmd_printk(KERN_INFO, scmd, 2099 scmd_printk(KERN_INFO, scmd,
2109 "%s: flush finish cmd: %p\n", 2100 "%s: flush finish cmd\n",
2110 current->comm, scmd)); 2101 current->comm));
2111 scsi_finish_command(scmd); 2102 scsi_finish_command(scmd);
2112 } 2103 }
2113 } 2104 }