From: Ingo Molnar <mingo@elte.hu>
To: Alexey Fisher <bug-track@fisher-privat.net>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Ricardo Cerqueira <v4l@cerqueira.org>,
Maxim Levitsky <maximlevitsky@gmail.com>,
Hartmut Hackmann <hartmut.hackmann@t-online.de>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>,
Kernel Testers List <kernel-testers@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH] saa7134: fix resource map sanity check conflict
Date: Wed, 22 Oct 2008 11:33:02 +0200 [thread overview]
Message-ID: <20081022093302.GE12453@elte.hu> (raw)
In-Reply-To: <1224570426.5287.1.camel@zwerg>
* Alexey Fisher <bug-track@fisher-privat.net> wrote:
> Thanks, suresh! this patch working for me. dmesg is attached.
thanks Alexey!
I've Cc:-ed the saa7134 developers - please pick up Suresh's fix below.
A new debug check in ioremap() caught a bug in the saa7134 driver.
Ingo
---------------->
>From afed66317accd2fdfeb57061102c20796fb9ff66 Mon Sep 17 00:00:00 2001
From: Suresh Siddha <suresh.b.siddha@intel.com>
Date: Mon, 20 Oct 2008 13:57:02 -0700
Subject: [PATCH] saa7134: fix resource map sanity check conflict
Impact: driver could possibly stomp on resources outside of its scope
Alexey Fisher reported:
> resource map sanity check conflict: 0xcfeff800 0xcff007ff 0xcfe00000
> 0xcfefffff PCI Bus 0000:01
BAR base is located in the middle of the 4K page and the hardcoded
size argument makes the request span two pages causing the conflict.
Fix the hard coded size argument in ioremap().
Reported-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Tested-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
drivers/media/video/saa7134/saa7134-core.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c
index b686bfa..0c13821 100644
--- a/drivers/media/video/saa7134/saa7134-core.c
+++ b/drivers/media/video/saa7134/saa7134-core.c
@@ -941,7 +941,8 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
dev->name,(unsigned long long)pci_resource_start(pci_dev,0));
goto fail1;
}
- dev->lmmio = ioremap(pci_resource_start(pci_dev,0), 0x1000);
+ dev->lmmio = ioremap(pci_resource_start(pci_dev, 0),
+ pci_resource_len(pci_dev, 0));
dev->bmmio = (__u8 __iomem *)dev->lmmio;
if (NULL == dev->lmmio) {
err = -EIO;
prev parent reply other threads:[~2008-10-22 9:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1224340447.5325.4.camel@zwerg>
2008-10-20 20:57 ` [saa7133] resource map sanity check conflict Suresh Siddha
2008-10-21 6:27 ` Alexey Fisher
2008-10-22 9:33 ` Ingo Molnar [this message]
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=20081022093302.GE12453@elte.hu \
--to=mingo@elte.hu \
--cc=bug-track@fisher-privat.net \
--cc=hartmut.hackmann@t-online.de \
--cc=kernel-testers@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maximlevitsky@gmail.com \
--cc=mchehab@infradead.org \
--cc=suresh.b.siddha@intel.com \
--cc=v4l@cerqueira.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