Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Aug 2016 15:17:36 +0000 (UTC)
From:      Randall Stewart <rrs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r304224 - head/sys/netinet
Message-ID:  <201608161517.u7GFHavn040830@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rrs
Date: Tue Aug 16 15:17:36 2016
New Revision: 304224
URL: https://svnweb.freebsd.org/changeset/base/304224

Log:
  A few more wording tweaks as suggested (with some modifications
  as well) by Ravi Pokala. Thanks for the comments :-)
  Sponsored by: Netflix Inc.

Modified:
  head/sys/netinet/tcp_timer.c

Modified: head/sys/netinet/tcp_timer.c
==============================================================================
--- head/sys/netinet/tcp_timer.c	Tue Aug 16 15:11:46 2016	(r304223)
+++ head/sys/netinet/tcp_timer.c	Tue Aug 16 15:17:36 2016	(r304224)
@@ -307,15 +307,15 @@ tcp_timer_delack(void *xtp)
  * should only have grabbed the INP_WLOCK() when
  * it entered. To safely switch to holding both the
  * INP_INFO_RLOCK() and the INP_WLOCK() we must first
- * grab a reference on the inp, this will hold the inp
- * so that it can't be removed. We then unlock and grab
- * the info-read lock. Once we have the INP_INFO_RLOCK() we
- * proceed again to get the INP_WLOCK() but after that
- * we must check if someone else deleted the pcb i.e.
- * the inp_flags check.	If so we return 1 otherwise 
- * we return 0.
+ * grab a reference on the inp, which will hold the inp
+ * so that it can't be removed. We then unlock the INP_WLOCK(), 
+ * and grab the INP_INFO_RLOCK() lock. Once we have the INP_INFO_RLOCK()
+ * we proceed again to get the INP_WLOCK() (this preserves proper
+ * lock order). After acquiring the INP_WLOCK we must check if someone 
+ * else deleted the pcb i.e. the inp_flags check.
+ * If so we return 1 otherwise we return 0.
  *
- * No matter which the tcp_inpinfo_lock_add() function
+ * No matter what the tcp_inpinfo_lock_add() function
  * returns the caller must afterwards call tcp_inpinfo_lock_del()
  * to drop the locks and reference properly.
  */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608161517.u7GFHavn040830>