diff options
author | mjg <mjg@FreeBSD.org> | 2016-12-31 12:47:41 +0000 |
---|---|---|
committer | mjg <mjg@FreeBSD.org> | 2016-12-31 12:47:41 +0000 |
commit | 3f249b39b642cf9a80c7bb94b19649762799121c (patch) | |
tree | 89453227c070ffdb92dc47747729fd298b9b674f /sys/kern/kern_descrip.c | |
parent | 6f6928c2e91fec9721d5cb360f5b7cdc42ba831e (diff) | |
download | FreeBSD-src-3f249b39b642cf9a80c7bb94b19649762799121c.zip FreeBSD-src-3f249b39b642cf9a80c7bb94b19649762799121c.tar.gz |
MFC r303921:
sigio: do a lockless check in funsetownlist
There is no need to grab the lock first to see if sigio is used, and it
typically is not.
Diffstat (limited to 'sys/kern/kern_descrip.c')
-rw-r--r-- | sys/kern/kern_descrip.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 45e6e97..29a1d4b 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -939,6 +939,8 @@ funsetown(struct sigio **sigiop) { struct sigio *sigio; + if (*sigiop == NULL) + return; SIGIO_LOCK(); sigio = *sigiop; if (sigio == NULL) { |