Date: Sun, 7 Sep 2014 05:44:15 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271216 - head/sys/kern Message-ID: <201409070544.s875iFSD065313@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Sun Sep 7 05:44:14 2014 New Revision: 271216 URL: http://svnweb.freebsd.org/changeset/base/271216 Log: Fix for r271182. Submitted by: mjg Pointy hat to: me, submitter and everyone who urged me to commit Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Sun Sep 7 00:46:57 2014 (r271215) +++ head/sys/kern/uipc_socket.c Sun Sep 7 05:44:14 2014 (r271216) @@ -3245,6 +3245,7 @@ static int filt_soread(struct knote *kn, long hint) { struct socket *so; + int ret; so = kn->kn_fp->f_data; SOCKBUF_LOCK_ASSERT(&so->so_rcv); @@ -3267,11 +3268,12 @@ filt_soread(struct knote *kn, long hint) CURVNET_SET(so->so_vnet); if (V_socket_hhh[HHOOK_FILT_SOREAD]->hhh_nhooks > 0) - /* This hook returning non-zero indicates an event, not error */ - return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD)); + ret = hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD); + else + ret = 0; CURVNET_RESTORE(); - - return (0); + + return (ret); } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409070544.s875iFSD065313>