From: "Rolf Eike Beer" <eike-kernel@sf-tec.de>
To: "Joe Perches" <joe@perches.com>
Cc: "Andrew Vasquez" <andrew.vasquez@qlogic.com>,
linux-driver@qlogic.com,
"James E.J. Bottomley" <jbottomley@parallels.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] qla2xxx: Rewrite logging functions to use %pV
Date: Sun, 31 Jul 2011 10:02:52 +0200 [thread overview]
Message-ID: <256822902b9b2221e206b75f384bdc68.squirrel@webmail.sf-mail.de> (raw)
In-Reply-To: <f404820a01953db2c3608f90c40b8567646f079a.1312067036.git.joe@perches.com>
> + 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
next prev parent reply other threads:[~2011-07-31 8:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-30 23:05 [PATCH 0/2] qla2xxx: logging functions fixups Joe Perches
2011-07-30 23:05 ` [PATCH 1/2] qla2xxx: Rewrite logging functions to use %pV Joe Perches
2011-07-31 8:02 ` Rolf Eike Beer [this message]
2011-07-31 8:08 ` Joe Perches
2011-08-09 20:54 ` Saurav Kashyap
2011-07-30 23:05 ` [PATCH 2/2] qla2xxx: Add __attribute__((format(printf... and fix fallout Joe Perches
2011-08-09 20:55 ` Saurav Kashyap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=256822902b9b2221e206b75f384bdc68.squirrel@webmail.sf-mail.de \
--to=eike-kernel@sf-tec.de \
--cc=andrew.vasquez@qlogic.com \
--cc=jbottomley@parallels.com \
--cc=joe@perches.com \
--cc=linux-driver@qlogic.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®