summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/syscall/sigqueue.c
diff options
context:
space:
mode:
authorKeith M Wesolowski <wesolows@foobazco.org>2013-09-27 22:00:22 +0000
committerKeith M Wesolowski <wesolows@foobazco.org>2013-09-27 22:00:38 +0000
commit6e9b3f5c7960aff925cedb83f71a64c153f8d89d (patch)
treeb47610110a3c95c340f735fa800927a587316828 /usr/src/uts/common/syscall/sigqueue.c
parentbfe86d8aef682dd2cc1970ba302b519789fcf539 (diff)
parent6ed0a5cff079e25f4aa15cef67c6dd48ee60b018 (diff)
downloadillumos-joyent-6e9b3f5c7960aff925cedb83f71a64c153f8d89d.tar.gz
[illumos-gate merge]
commit 6ed0a5cff079e25f4aa15cef67c6dd48ee60b018 4090 igb I210/I211 support commit 75eba5b6d79ed4d2ce3daf7b2806306b6b69a938 4091 e1000g I217/I218 support 4092 Intel 1GBe NIC common code should be shared commit 80c94ecd7a524eb933a4bb221a9618b9dc490e76 3881 want device driver for HP SmartArray RAID controllers commit 5e989a96186a37eb528fb7bb4d28a150874ec799 3830 SIGQUEUE_MAX's limit of 32 is too low commit b9476f453004695da12eaaff383ed9005e7a47c4 4158 want getifaddrs manual page Conflicts: usr/src/man/man5/resource_controls.5 usr/src/man/man7d/cpqary3.7d usr/src/pkg/manifests/driver-storage-cpqary3.mf usr/src/uts/common/io/cpqary3/cpqary3.c usr/src/uts/common/Makefile.files usr/src/uts/intel/cpqary3/Makefile Manifests: usr/src/pkg/manifests/driver-network-e1000g.mf usr/src/pkg/manifests/driver-network-igb.mf
Diffstat (limited to 'usr/src/uts/common/syscall/sigqueue.c')
-rw-r--r--usr/src/uts/common/syscall/sigqueue.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/usr/src/uts/common/syscall/sigqueue.c b/usr/src/uts/common/syscall/sigqueue.c
index cb38bafbd9..9f4eb67f79 100644
--- a/usr/src/uts/common/syscall/sigqueue.c
+++ b/usr/src/uts/common/syscall/sigqueue.c
@@ -26,8 +26,6 @@
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/param.h>
#include <sys/types.h>
#include <sys/sysmacros.h>
@@ -40,6 +38,8 @@
#include <sys/siginfo.h>
#include <sys/debug.h>
+extern rctl_hndl_t rc_process_sigqueue;
+
static int
sigqkill(pid_t pid, sigsend_t *sigsend)
{
@@ -121,7 +121,7 @@ kill(pid_t pid, int sig)
*/
int
sigqueue(pid_t pid, int sig, /* union sigval */ void *value,
- int si_code, int block)
+ int si_code, int block)
{
int error;
sigsend_t v;
@@ -133,8 +133,15 @@ sigqueue(pid_t pid, int sig, /* union sigval */ void *value,
return (set_errno(EINVAL));
if ((sqh = p->p_sigqhdr) == NULL) {
+ rlim64_t sigqsz_max;
+
+ mutex_enter(&p->p_lock);
+ sigqsz_max = rctl_enforced_value(rc_process_sigqueue,
+ p->p_rctls, p);
+ mutex_exit(&p->p_lock);
+
/* Allocate sigqueue pool first time */
- sqh = sigqhdralloc(sizeof (sigqueue_t), _SIGQUEUE_MAX);
+ sqh = sigqhdralloc(sizeof (sigqueue_t), (uint_t)sigqsz_max);
mutex_enter(&p->p_lock);
if (p->p_sigqhdr == NULL) {
/* hang the pool head on proc */