Date: Wed, 17 Feb 2016 18:12:38 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295710 - head/sys/netinet Message-ID: <201602171812.u1HICc8M016422@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Wed Feb 17 18:12:38 2016 New Revision: 295710 URL: https://svnweb.freebsd.org/changeset/base/295710 Log: Add protection code for issues reported by PVS / D5245. MFC after: 3 days Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Wed Feb 17 18:04:22 2016 (r295709) +++ head/sys/netinet/sctp_input.c Wed Feb 17 18:12:38 2016 (r295710) @@ -909,7 +909,9 @@ sctp_handle_shutdown(struct sctp_shutdow return; } #endif - sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket); + if (stcb->sctp_socket) { + sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket); + } #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -4858,7 +4860,7 @@ process_control_chunks: if ((stcb) && (stcb->asoc.total_output_queue_size)) { ; } else { - if (locked_tcb != stcb) { + if ((locked_tcb != NULL) && (locked_tcb != stcb)) { /* Very unlikely */ SCTP_TCB_UNLOCK(locked_tcb); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602171812.u1HICc8M016422>