public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* Questionable code in pci_sal_read
@ 2005-01-25 15:21 Andreas Schwab
  2005-01-25 15:27 ` Matthew Wilcox
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Andreas Schwab @ 2005-01-25 15:21 UTC (permalink / raw)
  To: linux-ia64

These are the first few lines in pci_sal_read:

	if ((seg > 255) || (bus > 255) || (devfn > 255) || (reg > 4095))
		return -EINVAL;

	if ((seg | reg) <= 255) {

When seg <= 255 then ((seg | reg) <= 255) is equivalent to (reg <= 255).
But pci_sal_write only rejects (seg > 65535).

The lines come from this changeset:

http://linux.bkbits.net:8080/linux-2.6/cset%40407c8325V8ZAIQkFDRCUNpu5AXqG1g

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-01-25 21:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2005-01-25 20:47 ` Luck, Tony
2005-01-25 21:15 ` Matthew Wilcox
2005-01-25 21:22 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox