mirror of
https://github.com/opnsense/src.git
synced 2026-04-24 15:48:48 -04:00
Patch the reintroduced (~0 << 32) == 1 bug with a cryptic but functional
version. This should fix the read-before-write problem again. Obtained from: "Adam J. Richter" <adam@yggdrasil.com>
This commit is contained in:
parent
2a1735da45
commit
6548daa8aa
2 changed files with 4 additions and 2 deletions
|
|
@ -572,7 +572,8 @@ AcpiAmlWriteFieldDataWithUpdateRule (
|
|||
|
||||
/* Check if update rule needs to be applied (not if mask is all ones) */
|
||||
|
||||
if (((1 << BitGranularity) -1) & ~Mask)
|
||||
/* The left shift drops the bits we want to ignore. */
|
||||
if ((~Mask << (sizeof(Mask) * 8 - BitGranularity)) != 0)
|
||||
{
|
||||
/*
|
||||
* Read the current contents of the byte/word/dword containing
|
||||
|
|
|
|||
|
|
@ -572,7 +572,8 @@ AcpiAmlWriteFieldDataWithUpdateRule (
|
|||
|
||||
/* Check if update rule needs to be applied (not if mask is all ones) */
|
||||
|
||||
if (((1 << BitGranularity) -1) & ~Mask)
|
||||
/* The left shift drops the bits we want to ignore. */
|
||||
if ((~Mask << (sizeof(Mask) * 8 - BitGranularity)) != 0)
|
||||
{
|
||||
/*
|
||||
* Read the current contents of the byte/word/dword containing
|
||||
|
|
|
|||
Loading…
Reference in a new issue