summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/inet/udp/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/inet/udp/udp.c')
-rw-r--r--usr/src/uts/common/inet/udp/udp.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/usr/src/uts/common/inet/udp/udp.c b/usr/src/uts/common/inet/udp/udp.c
index 53e1185fa1..fc9842bb7d 100644
--- a/usr/src/uts/common/inet/udp/udp.c
+++ b/usr/src/uts/common/inet/udp/udp.c
@@ -3112,6 +3112,7 @@ udp_output_ancillary(conn_t *connp, sin_t *sin, sin6_t *sin6, mblk_t *mp,
return (ENOMEM);
}
ASSERT(cr != NULL);
+ ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
ixa->ixa_cred = cr;
ixa->ixa_cpid = pid;
if (is_system_labeled()) {
@@ -3125,6 +3126,7 @@ udp_output_ancillary(conn_t *connp, sin_t *sin, sin6_t *sin6, mblk_t *mp,
/* Get a copy of conn_xmit_ipp since the options might change it */
ipp = kmem_zalloc(sizeof (*ipp), KM_NOSLEEP);
if (ipp == NULL) {
+ ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
ixa->ixa_cred = connp->conn_cred; /* Restore */
ixa->ixa_cpid = connp->conn_cpid;
ixa_refrele(ixa);
@@ -3356,6 +3358,7 @@ udp_output_ancillary(conn_t *connp, sin_t *sin, sin6_t *sin6, mblk_t *mp,
break;
}
done:
+ ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
ixa->ixa_cred = connp->conn_cred; /* Restore */
ixa->ixa_cpid = connp->conn_cpid;
ixa_refrele(ixa);
@@ -3388,6 +3391,7 @@ udp_output_connected(conn_t *connp, mblk_t *mp, cred_t *cr, pid_t pid)
}
ASSERT(cr != NULL);
+ ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
ixa->ixa_cred = cr;
ixa->ixa_cpid = pid;
@@ -3398,6 +3402,7 @@ udp_output_connected(conn_t *connp, mblk_t *mp, cred_t *cr, pid_t pid)
if (mp == NULL) {
ASSERT(error != 0);
mutex_exit(&connp->conn_lock);
+ ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
ixa->ixa_cred = connp->conn_cred; /* Restore */
ixa->ixa_cpid = connp->conn_cpid;
ixa_refrele(ixa);
@@ -3455,6 +3460,7 @@ udp_output_connected(conn_t *connp, mblk_t *mp, cred_t *cr, pid_t pid)
/* FALLTHRU */
default:
failed:
+ ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
ixa->ixa_cred = connp->conn_cred; /* Restore */
ixa->ixa_cpid = connp->conn_cpid;
ixa_refrele(ixa);
@@ -3488,6 +3494,7 @@ udp_output_connected(conn_t *connp, mblk_t *mp, cred_t *cr, pid_t pid)
error = ENETUNREACH;
break;
}
+ ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
ixa->ixa_cred = connp->conn_cred; /* Restore */
ixa->ixa_cpid = connp->conn_cpid;
ixa_refrele(ixa);
@@ -3512,6 +3519,7 @@ udp_output_lastdst(conn_t *connp, mblk_t *mp, cred_t *cr, pid_t pid,
ASSERT(ixa != NULL);
ASSERT(cr != NULL);
+ ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
ixa->ixa_cred = cr;
ixa->ixa_cpid = pid;
@@ -3521,6 +3529,7 @@ udp_output_lastdst(conn_t *connp, mblk_t *mp, cred_t *cr, pid_t pid,
if (mp == NULL) {
ASSERT(error != 0);
mutex_exit(&connp->conn_lock);
+ ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
ixa->ixa_cred = connp->conn_cred; /* Restore */
ixa->ixa_cpid = connp->conn_cpid;
ixa_refrele(ixa);
@@ -3578,6 +3587,7 @@ udp_output_lastdst(conn_t *connp, mblk_t *mp, cred_t *cr, pid_t pid,
/* FALLTHRU */
default:
failed:
+ ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
ixa->ixa_cred = connp->conn_cred; /* Restore */
ixa->ixa_cpid = connp->conn_cpid;
ixa_refrele(ixa);
@@ -3623,6 +3633,7 @@ udp_output_lastdst(conn_t *connp, mblk_t *mp, cred_t *cr, pid_t pid,
mutex_exit(&connp->conn_lock);
break;
}
+ ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
ixa->ixa_cred = connp->conn_cred; /* Restore */
ixa->ixa_cpid = connp->conn_cpid;
ixa_refrele(ixa);
@@ -4147,6 +4158,7 @@ udp_output_newdst(conn_t *connp, mblk_t *data_mp, sin_t *sin, sin6_t *sin6,
*/
ASSERT(cr != NULL);
+ ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
ixa->ixa_cred = cr;
ixa->ixa_cpid = pid;
if (is_system_labeled()) {
@@ -4422,12 +4434,14 @@ udp_output_newdst(conn_t *connp, mblk_t *data_mp, sin_t *sin, sin6_t *sin6,
mutex_exit(&connp->conn_lock);
break;
}
+ ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
ixa->ixa_cred = connp->conn_cred; /* Restore */
ixa->ixa_cpid = connp->conn_cpid;
ixa_refrele(ixa);
return (error);
ud_error:
+ ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
ixa->ixa_cred = connp->conn_cred; /* Restore */
ixa->ixa_cpid = connp->conn_cpid;
ixa_refrele(ixa);
@@ -5173,6 +5187,7 @@ udp_do_open(cred_t *credp, boolean_t isv6, int flags, int *errorp)
connp->conn_cpid = curproc->p_pid;
connp->conn_open_time = ddi_get_lbolt64();
/* Cache things in ixa without an extra refhold */
+ ASSERT(!(connp->conn_ixa->ixa_free_flags & IXA_FREE_CRED));
connp->conn_ixa->ixa_cred = connp->conn_cred;
connp->conn_ixa->ixa_cpid = connp->conn_cpid;
if (is_system_labeled())
@@ -6225,6 +6240,7 @@ udp_do_connect(conn_t *connp, const struct sockaddr *sa, socklen_t len,
connp->conn_cred = cr;
}
connp->conn_cpid = pid;
+ ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
ixa->ixa_cred = cr;
ixa->ixa_cpid = pid;
if (is_system_labeled()) {