4107 mutex_exit(&ai->ai_lock);
4108 }
4109 }
4110
4111 mutex_enter(&ipst->ips_ip_mi_lock);
4112 mi_close_unlink(&ipst->ips_ip_g_head, (IDP)ill);
4113 mutex_exit(&ipst->ips_ip_mi_lock);
4114
4115 /*
4116 * credp could be null if the open didn't succeed and ip_modopen
4117 * itself calls ip_close.
4118 */
4119 if (ill->ill_credp != NULL)
4120 crfree(ill->ill_credp);
4121
4122 mutex_destroy(&ill->ill_saved_ire_lock);
4123 mutex_destroy(&ill->ill_lock);
4124 rw_destroy(&ill->ill_mcast_lock);
4125 mutex_destroy(&ill->ill_mcast_serializer);
4126 list_destroy(&ill->ill_nce);
4127 cv_destroy(&ill->ill_dlpi_capab_cv);
4128 mutex_destroy(&ill->ill_dlpi_capab_lock);
4129
4130 /*
4131 * Now we are done with the module close pieces that
4132 * need the netstack_t.
4133 */
4134 netstack_rele(ipst->ips_netstack);
4135
4136 mi_close_free((IDP)ill);
4137 q->q_ptr = WR(q)->q_ptr = NULL;
4138
4139 ipsq_exit(ipsq);
4140
4141 return (0);
4142 }
4143
4144 /*
4145 * This is called as part of close() for IP, UDP, ICMP, and RTS
4146 * in order to quiesce the conn.
4147 */
4148 void
|
4107 mutex_exit(&ai->ai_lock);
4108 }
4109 }
4110
4111 mutex_enter(&ipst->ips_ip_mi_lock);
4112 mi_close_unlink(&ipst->ips_ip_g_head, (IDP)ill);
4113 mutex_exit(&ipst->ips_ip_mi_lock);
4114
4115 /*
4116 * credp could be null if the open didn't succeed and ip_modopen
4117 * itself calls ip_close.
4118 */
4119 if (ill->ill_credp != NULL)
4120 crfree(ill->ill_credp);
4121
4122 mutex_destroy(&ill->ill_saved_ire_lock);
4123 mutex_destroy(&ill->ill_lock);
4124 rw_destroy(&ill->ill_mcast_lock);
4125 mutex_destroy(&ill->ill_mcast_serializer);
4126 list_destroy(&ill->ill_nce);
4127
4128 /*
4129 * Now we are done with the module close pieces that
4130 * need the netstack_t.
4131 */
4132 netstack_rele(ipst->ips_netstack);
4133
4134 mi_close_free((IDP)ill);
4135 q->q_ptr = WR(q)->q_ptr = NULL;
4136
4137 ipsq_exit(ipsq);
4138
4139 return (0);
4140 }
4141
4142 /*
4143 * This is called as part of close() for IP, UDP, ICMP, and RTS
4144 * in order to quiesce the conn.
4145 */
4146 void
|