Date: Mon, 13 Jan 2020 21:12:11 +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: r356702 - head/sys/netinet Message-ID: <202001132112.00DLCBPX015120@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Mon Jan 13 21:12:10 2020 New Revision: 356702 URL: https://svnweb.freebsd.org/changeset/base/356702 Log: Fix yet another regression from r354484. Error code from cr_cansee() aliases with hard error from other operations. Reported by: flo Modified: head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Mon Jan 13 20:31:10 2020 (r356701) +++ head/sys/netinet/tcp_subr.c Mon Jan 13 21:12:10 2020 (r356702) @@ -2263,6 +2263,8 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) inp = CK_LIST_NEXT(inp, inp_list)) { INP_RLOCK(inp); if (inp->inp_gencnt <= xig.xig_gen) { + int crerr; + /* * XXX: This use of cr_cansee(), introduced with * TCP state changes, is not quite right, but for @@ -2270,13 +2272,13 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) */ if (inp->inp_flags & INP_TIMEWAIT) { if (intotw(inp) != NULL) - error = cr_cansee(req->td->td_ucred, + crerr = cr_cansee(req->td->td_ucred, intotw(inp)->tw_cred); else - error = EINVAL; /* Skip this inp. */ + crerr = EINVAL; /* Skip this inp. */ } else - error = cr_canseeinpcb(req->td->td_ucred, inp); - if (error == 0) { + crerr = cr_canseeinpcb(req->td->td_ucred, inp); + if (crerr == 0) { struct xtcpcb xt; tcp_inptoxtp(inp, &xt);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001132112.00DLCBPX015120>