On Mon, 2009-08-24 at 18:36 -0700, Peter Memishian wrote: > > > * 233-234: Is this just paranoia? If we're really dependent > > > on iptun_count(), then what prevents iptun_tunnelcount changing > > > immediately after the check, given that we're not holding any > > > locks? > > > > This isn't paranoia, but prevents the pseudo device from detaching (and > > the driver from unloading) when there are tunnels configured. We don't > > need to hold a lock here because the tunnel count is only changed when a > > tunnel is created or deleted, which can't happen while the detach > > routine is running (the ioctl path calls ddi_hold_devi_by_instance() in > > drv_ioctl(), and the /dev/net implicit path has the device open). > > I see. I think this warrants a comment.
I'll add one. -Seb