linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ide: Fix use of paired device
@ 2007-10-18  0:56 Benjamin Herrenschmidt
  2007-10-18  0:56 ` [PATCH 1/3] ide: Add ide_get_paired_drive() helper Benjamin Herrenschmidt
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Benjamin Herrenschmidt @ 2007-10-18  0:56 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: Linux IDE, linux-kernel, Andrew Morton

At least 2 drivers (siimage and cs5535) have a bug where they use
the construct:

	ide_drive_t *pair	= &hwif->drives[drive->dn ^ 1];

To access the other drive in a master/slave pair. This is bogus
because drive->dn is not the unit number, but the global drive
number, thus can be 2 & 3 for ide1, 4 & 5 for ide2 etc...

This causes the driver to access beyond the drive array into lalaland
for any other interface than ide0 and in some case, actually crash :-)

These 3 patches fix those by introducing a ide_get_paired_drive()
helper that does the right thing and then using it.

Please apply to 2.6.24 if no objection.


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

end of thread, other threads:[~2007-10-18 22:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-18  0:56 [PATCH 0/3] ide: Fix use of paired device Benjamin Herrenschmidt
2007-10-18  0:56 ` [PATCH 1/3] ide: Add ide_get_paired_drive() helper 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 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
2007-10-18  0:56 ` [PATCH 3/3] ide: Fix cs5535 " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).