From: David Mosberger <davidm@napali.hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: Questionable code in pci_sal_read
Date: Tue, 25 Jan 2005 17:44:43 +0000 [thread overview]
Message-ID: <16886.34187.323942.533224@napali.hpl.hp.com> (raw)
In-Reply-To: <jek6q1o7p2.fsf@sykes.suse.de>
>>>>> On Tue, 25 Jan 2005 16:21:45 +0100, Andreas Schwab <schwab@suse.de> said:
Andreas> These are the first few lines in pci_sal_read:
Andreas> if ((seg > 255) || (bus > 255) || (devfn > 255) || (reg > 4095))
Andreas> return -EINVAL;
Andreas> if ((seg | reg) <= 255) {
Andreas> When seg <= 255 then ((seg | reg) <= 255) is equivalent to
Andreas> (reg <= 255). But pci_sal_write only rejects (seg >
Andreas> 65535).
Andreas> The lines come from this changeset:
Andreas> http://linux.bkbits.net:8080/linux-2.6/cset%40407c8325V8ZAIQkFDRCUNpu5AXqG1g
Ah, yes, that looks wrong. Looks like the check for (seg > 255) came
from the original pci_sal_read(). The original pci_sal_ext_read() did
check for (seg > 65535). My bad.
Thanks for catching this.
--david
next prev parent reply other threads:[~2005-01-25 17:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-25 15:21 Questionable code in pci_sal_read Andreas Schwab
2005-01-25 15:27 ` Matthew Wilcox
2005-01-25 17:44 ` David Mosberger [this message]
2005-01-25 20:47 ` Luck, Tony
2005-01-25 21:15 ` Matthew Wilcox
2005-01-25 21:22 ` Bjorn Helgaas
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=16886.34187.323942.533224@napali.hpl.hp.com \
--to=davidm@napali.hpl.hp.com \
--cc=linux-ia64@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