Просмотр исходного кода

[hermon] Allocate sufficient space for firmware buffer

We were accidentally allocating only half the required amount of
memory (given the alignment method) for the firmware buffer, leading
to conflicts between the firmware buffer and gPXE code/data segments.
tags/v0.9.4
Michael Brown 17 лет назад
Родитель
Сommit
b45b39260c
1 измененных файлов: 1 добавлений и 1 удалений
  1. 1
    1
      src/drivers/infiniband/hermon.c

+ 1
- 1
src/drivers/infiniband/hermon.c Просмотреть файл

1684
 
1684
 
1685
 	/* Allocate firmware pages and map firmware area */
1685
 	/* Allocate firmware pages and map firmware area */
1686
 	fw_size = ( fw_pages * HERMON_PAGE_SIZE );
1686
 	fw_size = ( fw_pages * HERMON_PAGE_SIZE );
1687
-	hermon->firmware_area = umalloc ( fw_size );
1687
+	hermon->firmware_area = umalloc ( fw_size * 2 );
1688
 	if ( ! hermon->firmware_area ) {
1688
 	if ( ! hermon->firmware_area ) {
1689
 		rc = -ENOMEM;
1689
 		rc = -ENOMEM;
1690
 		goto err_alloc_fa;
1690
 		goto err_alloc_fa;

Загрузка…
Отмена
Сохранить