Source-Changes-D archive

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

Re: CVS commit: src/sys/netinet6




To generate a diff of this commit:

# cvs rdiff -u -r1.139 -r1.140 src/sys/netinet6/nd6_nbr.c
@@ -1097,7 +1097,11 @@ nd6_dad_stoptimer(struct dadq *dp)
 #ifdef NET_MPSAFE
        callout_halt(&dp->dad_timer_ch, NULL);
 #else
-       callout_halt(&dp->dad_timer_ch, softnet_lock);
+       /* XXX still need the trick for softnet_lock */
+       if (mutex_owned(softnet_lock))
+               callout_halt(&dp->dad_timer_ch, softnet_lock);
+       else
+               callout_halt(&dp->dad_timer_ch, NULL);
 #endif
 }

This goes against the restriction noted in the mutex(9) man page:

   [mutex_owned()] should not be used to make locking decisions at run
   time.  ...

Please find a different way to make this run-time decision.



+------------------+--------------------------+----------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+------------------+--------------------------+----------------------------+


Home | Main Index | Thread Index | Old Index