Re: OOPS: ext3/sparc badness

From: David S. Miller (davem@redhat.com)
Date: Fri Aug 30 2002 - 19:18:12 EST


   From: Andrew Beresford <beezly@beezly.org.uk>
   Date: Tue, 21 May 2002 09:38:05 +0100

   On Tue, May 21, 2002 at 01:18:58AM -0700, David S. Miller wrote:
> I don't think so... but please repost the link as I've deleted all of
> your emails.
   
   The link is;
   
   http://marc.theaimsgroup.com/?l=linux-raid&m=101981888804890&w=2

To recap, the compiler used to build sparc64 kernels miscompiles
drivers/md/raid1.c:raid1_read_balance()

The following appears to be a good workaround for this
bug, Neil could you put this into your tree and would you
mind if I sent this to Marcelo for 2.4.20-preX?

--- drivers/md/raid1.c.~1~ Fri Aug 30 17:03:02 2002
+++ drivers/md/raid1.c Fri Aug 30 17:17:46 2002
@@ -23,6 +23,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/config.h>
 #include <linux/slab.h>
 #include <linux/raid/raid1.h>
 #include <asm/atomic.h>
@@ -522,6 +523,10 @@
         if (conf->sect_count >= conf->mirrors[new_disk].sect_limit) {
                 conf->sect_count = 0;
 
+#if defined(CONFIG_SPARC64) && (__GNUC__ == 2) && (__GNUC_MINOR__ == 92)
+ /* Work around a compiler bug in egcs-2.92.11 19980921 */
+ new_disk = *(volatile int *)&new_disk;
+#endif
                 do {
                         if (new_disk<=0)
                                 new_disk = conf->raid_disks;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Aug 31 2002 - 22:00:32 EST