summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1995-11-30 23:03:46 +0000
committerderaadt <deraadt@openbsd.org>1995-11-30 23:03:46 +0000
commit6991afbb97baba23bc595732913012daeffca3df (patch)
tree60634a1409adbcf92abf81ca66bfe45cbe1ecd01
parentcorrect way to call tsleep is almost always "while (condition) tsleep(...)" (diff)
downloadwireguard-openbsd-6991afbb97baba23bc595732913012daeffca3df.tar.xz
wireguard-openbsd-6991afbb97baba23bc595732913012daeffca3df.zip
properly catch cases where buffers are on the kstack, from hannken@eis.cs.tu-bs.de
-rw-r--r--sys/dev/isa/aha.c3
-rw-r--r--sys/dev/isa/aha1542.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/isa/aha.c b/sys/dev/isa/aha.c
index 1049d677dfe..323bdd5d285 100644
--- a/sys/dev/isa/aha.c
+++ b/sys/dev/isa/aha.c
@@ -78,8 +78,7 @@
#ifdef i386
#include <machine/vmparam.h>
#define VOLATILE_XS(xs) \
- ((xs)->datalen > 0 && \
- ((vm_offset_t)((xs)->data) < VM_MIN_KERNEL_ADDRESS) && \
+ ((xs)->datalen > 0 && (xs)->bp == NULL && \
((xs)->flags & SCSI_POLL) == 0)
#else
#define VOLATILE_XS(xs) 0
diff --git a/sys/dev/isa/aha1542.c b/sys/dev/isa/aha1542.c
index 1049d677dfe..323bdd5d285 100644
--- a/sys/dev/isa/aha1542.c
+++ b/sys/dev/isa/aha1542.c
@@ -78,8 +78,7 @@
#ifdef i386
#include <machine/vmparam.h>
#define VOLATILE_XS(xs) \
- ((xs)->datalen > 0 && \
- ((vm_offset_t)((xs)->data) < VM_MIN_KERNEL_ADDRESS) && \
+ ((xs)->datalen > 0 && (xs)->bp == NULL && \
((xs)->flags & SCSI_POLL) == 0)
#else
#define VOLATILE_XS(xs) 0