/proc/partitions broken in 2.5.23
Here's a fix that works for me (the /proc/partitions output is still broken in 2.5.24 -- it appears to be following sgp->part[n] pointers that aren't initialised)
drivers/block/genhd.c renamed from tmp/geta29820 +1 -2
@@ -179,8 +179,7 @@/* show the full disk and all non-0 size partitions of it */ for (n =0 ; n < (sgp->nr_real << sgp->minor_shift); n++) { -int minormask = (1 <<sgp->minor_shift) -1 ; -if ((n & minormask) && sgp->part[n].nr_sects ==0 ) +if (sgp->sizes[n] ==0 )continue ; seq_printf(part, "%4d %4d %10llu %s\n", sgp->major, n, (unsigned long long)sgp->sizes[n],
drivers/ide/probe.c renamed from tmp/geta29832 +1 -0
@@ -1146,6 +1146,7 @@ gd->sizes =kmalloc (ATA_MINORS *sizeof (gd->sizes[0 ]),GFP_KERNEL );if (!gd->sizes) goto err_kmalloc_gd_sizes; +memset (gd->sizes,0 ,ATA_MINORS *sizeof (gd->sizes[0 ])); gd->part =kmalloc (ATA_MINORS *sizeof (struct hd_struct ),GFP_KERNEL );if (!gd->part)