Re: [PATCH 1/2] qla2xxx: Rewrite logging functions to use %pV

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +	if (vha != NULL) {
> +		const struct pci_dev *pdev = vha->hw->pdev;
> +		/* <module-name> <pci-name> <msg-id>:<host> Message */
> +		pr_warn("%s [%s]-%04x:%ld: %pV",
> +			QL_MSGHDR, dev_name(&(pdev->dev)), id + ql_dbg_offset,
> +			vha->host_no, &vaf);
> +	} else {
> +		pr_warn("%s [%s]-%04x: : %pV",
> +			QL_MSGHDR, "0000:00:00.0", id + ql_dbg_offset, &vaf);
>  	}

If I would see 0000:00:00.0 in the logmessage I would become scared that
something is dereferencing cleared memory, use after free or whatever.
Only by looking into the code I could see that this code simply has no
idea which device it is on. Well, then don't print an address when you
don't have one instead of inventing one.

Eike
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux