Skip to content

Commit

Permalink
Merge branch 'freebsd/12-stable/master' into hardened/12-stable/master
Browse files Browse the repository at this point in the history
* freebsd/12-stable/master:
  MFC r341632: acpi_{Device,Battery}IsPresent: restore pre-r330957 behaviour
  MFC r342030:   Plug memory leak for AES_*_NIST_GMAC algorithms.
  • Loading branch information
opntr-auto committed Dec 20, 2018
2 parents 8821c29 + 14d1b03 commit 775df21
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
18 changes: 12 additions & 6 deletions sys/dev/acpica/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2219,8 +2219,6 @@ acpi_DeviceIsPresent(device_t dev)
h = acpi_get_handle(dev);
if (h == NULL)
return (FALSE);
status = acpi_GetInteger(h, "_STA", &s);

/*
* Onboard serial ports on certain AMD motherboards have an invalid _STA
* method that always returns 0. Force them to always be treated as present.
Expand All @@ -2230,9 +2228,14 @@ acpi_DeviceIsPresent(device_t dev)
if (acpi_MatchHid(h, "AMDI0020") || acpi_MatchHid(h, "AMDI0010"))
return (TRUE);

/* If no _STA method, must be present */
status = acpi_GetInteger(h, "_STA", &s);

/*
* If no _STA method or if it failed, then assume that
* the device is present.
*/
if (ACPI_FAILURE(status))
return (status == AE_NOT_FOUND ? TRUE : FALSE);
return (TRUE);

return (ACPI_DEVICE_PRESENT(s) ? TRUE : FALSE);
}
Expand All @@ -2252,9 +2255,12 @@ acpi_BatteryIsPresent(device_t dev)
return (FALSE);
status = acpi_GetInteger(h, "_STA", &s);

/* If no _STA method, must be present */
/*
* If no _STA method or if it failed, then assume that
* the device is present.
*/
if (ACPI_FAILURE(status))
return (status == AE_NOT_FOUND ? TRUE : FALSE);
return (TRUE);

return (ACPI_BATTERY_PRESENT(s) ? TRUE : FALSE);
}
Expand Down
3 changes: 3 additions & 0 deletions sys/opencrypto/cryptosoft.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,9 @@ swcr_freesession(device_t dev, crypto_session_t cses)
case CRYPTO_SHA2_256:
case CRYPTO_SHA2_384:
case CRYPTO_SHA2_512:
case CRYPTO_AES_128_NIST_GMAC:
case CRYPTO_AES_192_NIST_GMAC:
case CRYPTO_AES_256_NIST_GMAC:
axf = swd->sw_axf;

if (swd->sw_ictx) {
Expand Down

0 comments on commit 775df21

Please sign in to comment.