diff options
author | alfred <alfred@FreeBSD.org> | 2001-04-18 22:18:39 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2001-04-18 22:18:39 +0000 |
commit | 3405c2ccfaa89a7eae96cd33fc941b60ba3f2ceb (patch) | |
tree | 1a78f947f681ecfa0a4ea98318a2d0311d11b38d /sys/sys/_sigset.h | |
parent | a222601bea58d10488a2942c409fda3e5890ea4c (diff) | |
download | FreeBSD-src-3405c2ccfaa89a7eae96cd33fc941b60ba3f2ceb.zip FreeBSD-src-3405c2ccfaa89a7eae96cd33fc941b60ba3f2ceb.tar.gz |
Check validity of signal callback requested via aio routines.
Also move the insertion of the request to after the request is validated,
there's still looks like there may be some problems if an invalid address
is passed to the aio routines, basically a possible leak or having a
not completely initialized structure on the queue may still be possible.
A new sig macro was made _SIG_VALID to check the validity of a signal,
it would be advisable to use it from now on (in kern/kern_sig.c) rather
than rolling your own.
PR: kern/17152
Diffstat (limited to 'sys/sys/_sigset.h')
-rw-r--r-- | sys/sys/_sigset.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/_sigset.h b/sys/sys/_sigset.h index 95891ff..ebbc4f5 100644 --- a/sys/sys/_sigset.h +++ b/sys/sys/_sigset.h @@ -53,6 +53,7 @@ #define _SIG_IDX(sig) ((sig) - 1) #define _SIG_WORD(sig) (_SIG_IDX(sig) >> 5) #define _SIG_BIT(sig) (1 << (_SIG_IDX(sig) & 31)) +#define _SIG_VALID(sig) ((sig) < _SIG_MAXSIG && (sig) > 0) /* * System defined signals. |