lkml.org 
[lkml]   [2002]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectBUG: pdcraid OOPS due to uninitialized variable access
Date
On both 2.4.18-6mdk (from 8.2) and in current cooker pdcraid oopses
immediately after insertion. The reason is usage of uninitialized
variable in drivers/ide/pdcraid.c:


static void __init probedisk(int devindex,int device, int raidlevel)
{
int i;
int major, minor;
struct promise_raid_conf *prom;
static unsigned char block[4096];
struct block_device *bdev;

if (devlist[devindex].device!=-1) /* already assigned to another
array
*/
return;
if (strcmp("Promise Technology, Inc.",prom->promise_id))
return; /* magic number must match */
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

here it bails out. prom is initialized later:

major = devlist[devindex].major;
minor = devlist[devindex].minor;

if (read_disk_sb(major,minor,(unsigned
char*)&block,sizeof(block)))
return;


prom = (struct promise_raid_conf*)&block[512];

I am sorry, I do not have vanilla kernel so I cannot check if bug is in
general kernel or Mandrake-specific.

-andrej

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:22    [W:0.061 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site