backport a bugfix from newos:
another terrible bug that managed to exist this long and not clobber everything. The io vector table was being created with an incorrect size, so all sorts of garbage was getting written to whomever was allocated after it. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1112 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ab4697fd0f
commit
8271683e44
@ -42,11 +42,11 @@ int_init(kernel_args *ka)
|
||||
int
|
||||
int_init2(kernel_args *ka)
|
||||
{
|
||||
io_vectors = (struct io_vector *)kmalloc(sizeof(struct io_vectors *) * NUM_IO_VECTORS);
|
||||
io_vectors = (struct io_vector *)kmalloc(sizeof(struct io_vector) * NUM_IO_VECTORS);
|
||||
if (io_vectors == NULL)
|
||||
panic("int_init2: could not create io vector table!\n");
|
||||
|
||||
memset(io_vectors, 0, sizeof(struct io_vector *) * NUM_IO_VECTORS);
|
||||
memset(io_vectors, 0, sizeof(struct io_vector) * NUM_IO_VECTORS);
|
||||
|
||||
return arch_int_init2(ka);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user