Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[pxe] Check for unhookable interrupts in PXENV_STOP_UNDI
PXENV_STOP_UNDI should return PXENV_STATUS_KEEP_UNDI if the UNDI
cannot be safely unloaded (e.g. due to interrupt vectors that could
not be unhooked).
  • Loading branch information
Michael Brown committed Jun 28, 2009
1 parent 07b5be3 commit ee1d315
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/arch/i386/interface/pxe/pxe_preboot.c
Expand Up @@ -37,6 +37,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <gpxe/init.h>
#include <gpxe/if_ether.h>
#include <basemem_packet.h>
#include <biosint.h>
#include "pxe.h"
#include "pxe_call.h"

Expand Down Expand Up @@ -316,6 +317,14 @@ PXENV_EXIT_t pxenv_stop_undi ( struct s_PXENV_STOP_UNDI *stop_undi ) {
/* Prepare for unload */
shutdown ( SHUTDOWN_BOOT );

/* Check to see if we still have any hooked interrupts */
if ( hooked_bios_interrupts != 0 ) {
DBG ( "PXENV_STOP_UNDI failed: %d interrupts still hooked\n",
hooked_bios_interrupts );
stop_undi->Status = PXENV_STATUS_KEEP_UNDI;
return PXENV_EXIT_FAILURE;
}

stop_undi->Status = PXENV_STATUS_SUCCESS;
return PXENV_EXIT_SUCCESS;
}
Expand Down

0 comments on commit ee1d315

Please sign in to comment.