39c39
< * $FreeBSD: head/sys/kern/kern_resource.c 91066 2002-02-22 13:32:01Z phk $
---
> * $FreeBSD: head/sys/kern/kern_resource.c 91140 2002-02-23 11:12:57Z tanimura $
114c114,115
< if (uap->who == 0)
---
> PGRPSESS_SLOCK();
> if (uap->who == 0) {
116,117c117,125
< else if ((pg = pgfind(uap->who)) == NULL)
< break;
---
> PGRP_LOCK(pg);
> } else {
> pg = pgfind(uap->who);
> if (pg == NULL) {
> PGRPSESS_SUNLOCK();
> break;
> }
> }
> PGRPSESS_SUNLOCK();
118a127
> PROC_LOCK(p);
120a130
> PROC_UNLOCK(p);
121a132
> PGRP_UNLOCK(pg);
188c199,200
< if (uap->who == 0)
---
> PGRPSESS_SLOCK();
> if (uap->who == 0) {
190,191c202,210
< else if ((pg = pgfind(uap->who)) == NULL)
< break;
---
> PGRP_LOCK(pg);
> } else {
> pg = pgfind(uap->who);
> if (pg == NULL) {
> PGRPSESS_SUNLOCK();
> break;
> }
> }
> PGRPSESS_SUNLOCK();
192a212
> PROC_LOCK(p);
196a217
> PROC_UNLOCK(p);
197a219
> PGRP_UNLOCK(pg);
< * $FreeBSD: head/sys/kern/kern_resource.c 91066 2002-02-22 13:32:01Z phk $
---
> * $FreeBSD: head/sys/kern/kern_resource.c 91140 2002-02-23 11:12:57Z tanimura $
114c114,115
< if (uap->who == 0)
---
> PGRPSESS_SLOCK();
> if (uap->who == 0) {
116,117c117,125
< else if ((pg = pgfind(uap->who)) == NULL)
< break;
---
> PGRP_LOCK(pg);
> } else {
> pg = pgfind(uap->who);
> if (pg == NULL) {
> PGRPSESS_SUNLOCK();
> break;
> }
> }
> PGRPSESS_SUNLOCK();
118a127
> PROC_LOCK(p);
120a130
> PROC_UNLOCK(p);
121a132
> PGRP_UNLOCK(pg);
188c199,200
< if (uap->who == 0)
---
> PGRPSESS_SLOCK();
> if (uap->who == 0) {
190,191c202,210
< else if ((pg = pgfind(uap->who)) == NULL)
< break;
---
> PGRP_LOCK(pg);
> } else {
> pg = pgfind(uap->who);
> if (pg == NULL) {
> PGRPSESS_SUNLOCK();
> break;
> }
> }
> PGRPSESS_SUNLOCK();
192a212
> PROC_LOCK(p);
196a217
> PROC_UNLOCK(p);
197a219
> PGRP_UNLOCK(pg);