提交 4f608393 编写于 作者: X Xiang Chen 提交者: Xie XiuQi

scsi: hisi_sas: replace "%p" with "%pK"

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

The format specifier "%p" can leak kernel address, and use "%pK" instead.
Signed-off-by: NXiang Chen <chenxiang66@hisilicon.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 478335c2
...@@ -2116,7 +2116,7 @@ _hisi_sas_internal_task_abort(struct hisi_hba *hisi_hba, ...@@ -2116,7 +2116,7 @@ _hisi_sas_internal_task_abort(struct hisi_hba *hisi_hba,
} }
exit: exit:
dev_dbg(dev, "internal task abort: task to dev %016llx task=%p " dev_dbg(dev, "internal task abort: task to dev %016llx task=%pK "
"resp: 0x%x sts 0x%x\n", "resp: 0x%x sts 0x%x\n",
SAS_ADDR(device->sas_addr), SAS_ADDR(device->sas_addr),
task, task,
......
...@@ -2420,7 +2420,7 @@ slot_complete_v2_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot) ...@@ -2420,7 +2420,7 @@ slot_complete_v2_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot)
slot_err_v2_hw(hisi_hba, task, slot, 2); slot_err_v2_hw(hisi_hba, task, slot, 2);
if (ts->stat != SAS_DATA_UNDERRUN) if (ts->stat != SAS_DATA_UNDERRUN)
dev_info(dev, "erroneous completion iptt=%d task=%p dev id=%d " dev_info(dev, "erroneous completion iptt=%d task=%pK dev id=%d "
"CQ hdr: 0x%x 0x%x 0x%x 0x%x " "CQ hdr: 0x%x 0x%x 0x%x 0x%x "
"Error info: 0x%x 0x%x 0x%x 0x%x\n", "Error info: 0x%x 0x%x 0x%x 0x%x\n",
slot->idx, task, sas_dev->device_id, slot->idx, task, sas_dev->device_id,
...@@ -2488,7 +2488,7 @@ slot_complete_v2_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot) ...@@ -2488,7 +2488,7 @@ slot_complete_v2_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot)
spin_lock_irqsave(&task->task_state_lock, flags); spin_lock_irqsave(&task->task_state_lock, flags);
if (task->task_state_flags & SAS_TASK_STATE_ABORTED) { if (task->task_state_flags & SAS_TASK_STATE_ABORTED) {
spin_unlock_irqrestore(&task->task_state_lock, flags); spin_unlock_irqrestore(&task->task_state_lock, flags);
dev_info(dev, "slot complete: task(%p) aborted\n", task); dev_info(dev, "slot complete: task(%pK) aborted\n", task);
return SAS_ABORTED_TASK; return SAS_ABORTED_TASK;
} }
task->task_state_flags |= SAS_TASK_STATE_DONE; task->task_state_flags |= SAS_TASK_STATE_DONE;
...@@ -2499,7 +2499,7 @@ slot_complete_v2_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot) ...@@ -2499,7 +2499,7 @@ slot_complete_v2_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot)
spin_lock_irqsave(&device->done_lock, flags); spin_lock_irqsave(&device->done_lock, flags);
if (test_bit(SAS_HA_FROZEN, &ha->state)) { if (test_bit(SAS_HA_FROZEN, &ha->state)) {
spin_unlock_irqrestore(&device->done_lock, flags); spin_unlock_irqrestore(&device->done_lock, flags);
dev_info(dev, "slot complete: task(%p) ignored\n ", dev_info(dev, "slot complete: task(%pK) ignored\n ",
task); task);
return sts; return sts;
} }
......
...@@ -2406,7 +2406,7 @@ slot_complete_v3_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot) ...@@ -2406,7 +2406,7 @@ slot_complete_v3_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot)
struct hisi_sas_itct *itct = &hisi_hba->itct[device_id]; struct hisi_sas_itct *itct = &hisi_hba->itct[device_id];
slot_err_v3_hw(hisi_hba, task, slot); slot_err_v3_hw(hisi_hba, task, slot);
dev_info(dev, "erroneous completion iptt=%d task=%p dev id=%d sas_addr=0x%llx " dev_info(dev, "erroneous completion iptt=%d task=%pK dev id=%d sas_addr=0x%llx "
"CQ hdr: 0x%x 0x%x 0x%x 0x%x " "CQ hdr: 0x%x 0x%x 0x%x 0x%x "
"Error info: 0x%x 0x%x 0x%x 0x%x\n", "Error info: 0x%x 0x%x 0x%x 0x%x\n",
slot->idx, task, sas_dev->device_id, slot->idx, task, sas_dev->device_id,
...@@ -2501,7 +2501,7 @@ slot_complete_v3_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot) ...@@ -2501,7 +2501,7 @@ slot_complete_v3_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot)
spin_lock_irqsave(&task->task_state_lock, flags); spin_lock_irqsave(&task->task_state_lock, flags);
if (task->task_state_flags & SAS_TASK_STATE_ABORTED) { if (task->task_state_flags & SAS_TASK_STATE_ABORTED) {
spin_unlock_irqrestore(&task->task_state_lock, flags); spin_unlock_irqrestore(&task->task_state_lock, flags);
dev_info(dev, "slot complete: task(%p) aborted\n", task); dev_info(dev, "slot complete: task(%pK) aborted\n", task);
return SAS_ABORTED_TASK; return SAS_ABORTED_TASK;
} }
task->task_state_flags |= SAS_TASK_STATE_DONE; task->task_state_flags |= SAS_TASK_STATE_DONE;
...@@ -2512,7 +2512,7 @@ slot_complete_v3_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot) ...@@ -2512,7 +2512,7 @@ slot_complete_v3_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot)
spin_lock_irqsave(&device->done_lock, flags); spin_lock_irqsave(&device->done_lock, flags);
if (test_bit(SAS_HA_FROZEN, &ha->state)) { if (test_bit(SAS_HA_FROZEN, &ha->state)) {
spin_unlock_irqrestore(&device->done_lock, flags); spin_unlock_irqrestore(&device->done_lock, flags);
dev_info(dev, "slot complete: task(%p) ignored\n ", dev_info(dev, "slot complete: task(%pK) ignored\n ",
task); task);
return sts; return sts;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册