From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linux IDE <linux-ide@vger.kernel.org>,
linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
stable@kernel.org
Subject: Re: [PATCH 2/3] ide: Fix siimage driver accessing beyond array boundary
Date: Thu, 18 Oct 2007 23:10:46 +0200 [thread overview]
Message-ID: <200710182310.46956.bzolnier@gmail.com> (raw)
In-Reply-To: <20071018005623.153C7DDEBD@ozlabs.org>
On Thursday 18 October 2007, Benjamin Herrenschmidt wrote:
> The siimage use an incorrect construct to access the other drive
> of a pair, causing it to access beyond an array boundary on non-0
> interfaces. This fixes it by using the new ide_get_paired_drive()
> hepler instead.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
applied with patch description fixes
> ---
>
> drivers/ide/pci/siimage.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-work/drivers/ide/pci/siimage.c
> ===================================================================
> --- linux-work.orig/drivers/ide/pci/siimage.c 2007-10-18 10:42:56.000000000 +1000
> +++ linux-work/drivers/ide/pci/siimage.c 2007-10-18 10:43:09.000000000 +1000
> @@ -180,7 +180,7 @@ static void sil_set_pio_mode(ide_drive_t
> const u16 data_speed[] = { 0x328a, 0x2283, 0x1104, 0x10c3, 0x10c1 };
>
> ide_hwif_t *hwif = HWIF(drive);
> - ide_drive_t *pair = &hwif->drives[drive->dn ^ 1];
> + ide_drive_t *pair = ide_get_paired_drive(drive);
> u32 speedt = 0;
> u16 speedp = 0;
> unsigned long addr = siimage_seldev(drive, 0x04);
next prev parent reply other threads:[~2007-10-18 22:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-18 0:56 [PATCH 0/3] ide: Fix use of paired device Benjamin Herrenschmidt
2007-10-18 0:56 ` Benjamin Herrenschmidt
2007-10-18 0:56 ` [PATCH 1/3] ide: Add ide_get_paired_drive() helper Benjamin Herrenschmidt
2007-10-18 0:56 ` Benjamin Herrenschmidt
2007-10-18 12:00 ` Sergei Shtylyov
2007-10-18 21:10 ` Bartlomiej Zolnierkiewicz
2007-10-18 0:56 ` [PATCH 2/3] ide: Fix siimage driver accessing beyond array boundary Benjamin Herrenschmidt
2007-10-18 0:56 ` Benjamin Herrenschmidt
2007-10-18 12:02 ` Sergei Shtylyov
2007-10-18 12:16 ` Benjamin Herrenschmidt
2007-10-18 21:30 ` Bartlomiej Zolnierkiewicz
2007-10-18 21:10 ` Bartlomiej Zolnierkiewicz [this message]
2007-10-18 0:56 ` [PATCH 3/3] ide: Fix cs5535 " Benjamin Herrenschmidt
2007-10-18 0:56 ` Benjamin Herrenschmidt
2007-10-18 12:03 ` Sergei Shtylyov
2007-10-18 21:10 ` Bartlomiej Zolnierkiewicz
2007-10-18 11:54 ` [PATCH 0/3] ide: Fix use of paired device Sergei Shtylyov
2007-10-18 11:58 ` Sergei Shtylyov
2007-10-18 12:14 ` Benjamin Herrenschmidt
2007-10-18 20:29 ` Bartlomiej Zolnierkiewicz
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=200710182310.46956.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.