[SCSI] ipr: fix resource path display and formatting
It was possible to overflow the buffer used to print out the formatted version of the resource path. The fix is to limit the number of bytes that get formatted. This patch also updates the ipr_show_resource_path function to display the resource address for devices that are attached to adapters that don't support resource paths. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
committed by
James Bottomley
parent
7e27d6e778
commit
5adcbeb34d
@@ -1684,8 +1684,9 @@ struct ipr_ucode_image_header {
|
||||
if (ipr_is_device(hostrcb)) { \
|
||||
if ((hostrcb)->ioa_cfg->sis64) { \
|
||||
printk(KERN_ERR IPR_NAME ": %s: " fmt, \
|
||||
ipr_format_resource_path(&hostrcb->hcam.u.error64.fd_res_path[0], \
|
||||
&hostrcb->rp_buffer[0]), \
|
||||
ipr_format_res_path(hostrcb->hcam.u.error64.fd_res_path, \
|
||||
hostrcb->rp_buffer, \
|
||||
sizeof(hostrcb->rp_buffer)), \
|
||||
__VA_ARGS__); \
|
||||
} else { \
|
||||
ipr_ra_err((hostrcb)->ioa_cfg, \
|
||||
|
Reference in New Issue
Block a user