mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 16:14:04 +02:00
NetworkPkg: Restore TPL Before Return
This patch fixes a few instances of error cases in NetworkPkg returning after a RaiseTPL call without restoring the TPL first. Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
This commit is contained in:
parent
f3bc6013d2
commit
0d129450c2
@ -61,7 +61,6 @@ EfiIp6GetModeData (
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
|
||||||
IpInstance = IP6_INSTANCE_FROM_PROTOCOL (This);
|
IpInstance = IP6_INSTANCE_FROM_PROTOCOL (This);
|
||||||
IpSb = IpInstance->Service;
|
IpSb = IpInstance->Service;
|
||||||
IpIf = IpInstance->Interface;
|
IpIf = IpInstance->Interface;
|
||||||
@ -70,6 +69,8 @@ EfiIp6GetModeData (
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
if (Ip6ModeData != NULL) {
|
if (Ip6ModeData != NULL) {
|
||||||
//
|
//
|
||||||
// IsStarted is "whether the EfiIp6Configure has been called".
|
// IsStarted is "whether the EfiIp6Configure has been called".
|
||||||
|
@ -216,12 +216,12 @@ SnpUndi32GetStatus (
|
|||||||
|
|
||||||
Snp = EFI_SIMPLE_NETWORK_DEV_FROM_THIS (This);
|
Snp = EFI_SIMPLE_NETWORK_DEV_FROM_THIS (This);
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
|
||||||
|
|
||||||
if (Snp == NULL) {
|
if (Snp == NULL) {
|
||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
switch (Snp->Mode.State) {
|
switch (Snp->Mode.State) {
|
||||||
case EfiSimpleNetworkInitialized:
|
case EfiSimpleNetworkInitialized:
|
||||||
break;
|
break;
|
||||||
|
@ -287,12 +287,12 @@ SnpUndi32Transmit (
|
|||||||
|
|
||||||
Snp = EFI_SIMPLE_NETWORK_DEV_FROM_THIS (This);
|
Snp = EFI_SIMPLE_NETWORK_DEV_FROM_THIS (This);
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
|
||||||
|
|
||||||
if (Snp == NULL) {
|
if (Snp == NULL) {
|
||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
switch (Snp->Mode.State) {
|
switch (Snp->Mode.State) {
|
||||||
case EfiSimpleNetworkInitialized:
|
case EfiSimpleNetworkInitialized:
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user