From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Andrea Arcangeli <andrea@suse.de>
Cc: Phillip Ezolt <ezolt@perf.zko.dec.com>,
axp-list@redhat.com, rth@twiddle.net, Jay.Estabrook@compaq.com,
linux-kernel@vger.kernel.org, clinux@zk3.dec.com,
wcarr@perf.zko.dec.com
Subject: Re: Alpha SCSI error on 2.4.0-test11
Date: Fri, 1 Dec 2000 14:56:19 +0300 [thread overview]
Message-ID: <20001201145619.A553@jurassic.park.msu.ru> (raw)
In-Reply-To: <20001201004049.A980@jurassic.park.msu.ru> <Pine.OSF.3.96.1001130171941.32335D-100000@perf.zko.dec.com> <20001130233742.A21823@athlon.random>
In-Reply-To: <20001130233742.A21823@athlon.random>; from andrea@suse.de on Thu, Nov 30, 2000 at 11:37:42PM +0100
On Thu, Nov 30, 2000 at 11:37:42PM +0100, Andrea Arcangeli wrote:
> test12-pre2 crashes at boot on my DS20. This patch workaround the problem
> but I would be _very_ surprised if this is the right fix :) It's obviously not
> meant for inclusion.
...
> - struct resource_list *ln = list->next;
> + struct resource_list *ln;
>
> + if (!list)
> + return;
> + ln = list->next;
Argh. I believe that crash could happen only if some broken device has
empty I/O or memory range and IORESOURCE_[IO,MEM] bit set.
Andrea, could you try this?
Ivan.
--- linux/drivers/pci/setup-res.c~ Thu Nov 30 12:14:31 2000
+++ linux/drivers/pci/setup-res.c Fri Dec 1 13:49:34 2000
@@ -136,6 +136,7 @@ pdev_sort_resources(struct pci_dev *dev,
for (i = 0; i < PCI_NUM_RESOURCES; i++) {
struct resource *r;
struct resource_list *list, *tmp;
+ unsigned long r_size;
/* PCI-PCI bridges may have I/O ports or
memory on the primary bus */
@@ -144,7 +145,9 @@ pdev_sort_resources(struct pci_dev *dev,
continue;
r = &dev->resource[i];
- if (!(r->flags & type_mask) || r->parent)
+ r_size = r->end - r->start;
+
+ if (!(r->flags & type_mask) || !r_size || r->parent)
continue;
for (list = head; ; list = list->next) {
unsigned long size = 0;
@@ -152,7 +155,7 @@ pdev_sort_resources(struct pci_dev *dev,
if (ln)
size = ln->res->end - ln->res->start;
- if (r->end - r->start > size) {
+ if (r_size > size) {
tmp = kmalloc(sizeof(*tmp), GFP_KERNEL);
tmp->next = ln;
tmp->res = r;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-12-01 12:33 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-30 20:02 Phillip Ezolt
2000-11-30 20:37 ` Peter Rival
2000-11-30 21:40 ` Ivan Kokshaysky
2000-11-30 22:26 ` Phillip Ezolt
2000-11-30 22:37 ` Andrea Arcangeli
2000-12-01 11:56 ` Ivan Kokshaysky [this message]
2000-12-01 14:18 ` mm->context[NR_CPUS] and pci fix check [was Re: Alpha SCSI error on 2.4.0-test11] Andrea Arcangeli
2000-12-01 18:19 ` David S. Miller
2000-12-01 19:14 ` Andrea Arcangeli
2000-12-15 15:46 ` Andrea Arcangeli
2000-12-15 17:11 ` David S. Miller
2000-12-15 17:44 ` David S. Miller
2000-12-15 17:55 ` Andrea Arcangeli
2000-12-01 18:30 ` Alpha SCSI error on 2.4.0-test11 Phillip Ezolt
2000-12-01 19:35 ` Andrea Arcangeli
2000-12-01 19:56 ` Phillip Ezolt
2000-12-01 20:26 ` Andrea Arcangeli
2000-12-05 15:52 ` Phillip Ezolt
2000-12-01 22:11 ` Ivan Kokshaysky
2000-12-04 18:53 ` Phillip Ezolt
2000-12-06 0:06 ` Jay Estabrook
2000-12-06 14:51 ` Phillip Ezolt
2000-11-30 21:42 Mathiasen, Torben
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=20001201145619.A553@jurassic.park.msu.ru \
--to=ink@jurassic.park.msu.ru \
--cc=Jay.Estabrook@compaq.com \
--cc=andrea@suse.de \
--cc=axp-list@redhat.com \
--cc=clinux@zk3.dec.com \
--cc=ezolt@perf.zko.dec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rth@twiddle.net \
--cc=wcarr@perf.zko.dec.com \
/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®