DragonFly commits List (threaded) for 2008-08
DragonFly BSD
DragonFly commits List (threaded) for 2008-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

cvs commit: src/sys/net/ipfw ip_fw2.c


From: Sepherosa Ziehau <sephe@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 9 Aug 2008 00:08:20 -0700 (PDT)

sephe       2008/08/09 00:08:20 PDT

DragonFly src repository

  Modified files:
    sys/net/ipfw         ip_fw2.c 
  Log:
  Though following code sequence is safe currently (even w/o BGL):
    if (ipfw_dyn_v != NULL) {
      lockmgr(&dyn_lock, LK_...);
      /* accessing ipfw_dyn_v */
      lockmgr(&dyn_lock, LK_RELEASE)
    }
  
  it will be better for us to guard against future code changes by using:
    if (ipfw_dyn_v != NULL) {
      lockmgr(&dyn_lock, LK_...);
      if (ipfw_dyn_v != NULL) {
        /* accessing ipfw_dyn_v */
      }
      lockmgr(&dyn_lock, LK_RELEASE)
    }
  
  Revision  Changes    Path
  1.69      +11 -0     src/sys/net/ipfw/ip_fw2.c


http://www.dragonflybsd.org/cvsweb/src/sys/net/ipfw/ip_fw2.c.diff?r1=1.68&r2=1.69&f=u



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]