Skip to content

Commit

Permalink
5026 intra-node/inter-zone networking doesn't always deliver SIGPOLL
Browse files Browse the repository at this point in the history
Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Garrett D'Amore <garrett@damore.org>
  • Loading branch information
Dan McDonald committed Jul 24, 2014
1 parent ceec9e1 commit d690b62
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions usr/src/uts/common/fs/sockfs/sockcommon_subr.c
Expand Up @@ -22,6 +22,9 @@
/*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved.
*/

#include <sys/types.h>
#include <sys/param.h>
Expand Down Expand Up @@ -396,7 +399,12 @@ socket_sendsig(struct sonode *so, int event)
* the proc is active.
*/
mutex_enter(&pidlock);
proc = prfind(so->so_pgrp);
/*
* Even if the thread started in another zone, we're receiving
* on behalf of this socket's zone, so find the proc using the
* socket's zone ID.
*/
proc = prfind_zone(so->so_pgrp, so->so_zoneid);
if (proc == NULL) {
mutex_exit(&pidlock);
return;
Expand All @@ -413,7 +421,12 @@ socket_sendsig(struct sonode *so, int event)
pid_t pgrp = -so->so_pgrp;

mutex_enter(&pidlock);
proc = pgfind(pgrp);
/*
* Even if the thread started in another zone, we're receiving
* on behalf of this socket's zone, so find the pgrp using the
* socket's zone ID.
*/
proc = pgfind_zone(pgrp, so->so_zoneid);
while (proc != NULL) {
mutex_enter(&proc->p_lock);
socket_sigproc(proc, event);
Expand Down

0 comments on commit d690b62

Please sign in to comment.