aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib
diff options
context:
space:
mode:
authorMike Smith <msmith@FreeBSD.org>2001-02-02 08:31:50 +0000
committerMike Smith <msmith@FreeBSD.org>2001-02-02 08:31:50 +0000
commit6548daa8aae35970bc16343f7d33bc83cb65f2e9 (patch)
tree51ed1cd59b070d62f8f6ec6e81a631eac378b2a4 /sys/contrib
parent2a1735da459a65e8e34aee319519fb27dc6bf09b (diff)
downloadsrc-6548daa8aae35970bc16343f7d33bc83cb65f2e9.tar.gz
src-6548daa8aae35970bc16343f7d33bc83cb65f2e9.zip
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>
Notes
Notes: svn path=/head/; revision=71923
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amfldio.c3
-rw-r--r--sys/contrib/dev/acpica/exfldio.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amfldio.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amfldio.c
index ad40aec984e4..b8583d87ce9a 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amfldio.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amfldio.c
@@ -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
diff --git a/sys/contrib/dev/acpica/exfldio.c b/sys/contrib/dev/acpica/exfldio.c
index ad40aec984e4..b8583d87ce9a 100644
--- a/sys/contrib/dev/acpica/exfldio.c
+++ b/sys/contrib/dev/acpica/exfldio.c
@@ -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