[BACK]Return to uipc_socket.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / kern

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/kern/uipc_socket.c between version 1.134.2.1 and 1.134.2.2

version 1.134.2.1, 2007/03/13 16:51:58 version 1.134.2.2, 2007/04/10 13:26:42
Line 1 
Line 1 
 /*      $NetBSD$        */  /*      $NetBSD$        */
   
 /*-  /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.   * Copyright (c) 2002, 2007 The NetBSD Foundation, Inc.
  * All rights reserved.   * All rights reserved.
  *   *
  * This code is derived from software contributed to The NetBSD Foundation   * This code is derived from software contributed to The NetBSD Foundation
Line 298  sodopendfree()
Line 298  sodopendfree()
 static size_t  static size_t
 sodopendfreel()  sodopendfreel()
 {  {
           struct mbuf *m, *next;
         size_t rv = 0;          size_t rv = 0;
           int s;
   
         KASSERT(mutex_owned(&so_pendfree_lock));          KASSERT(mutex_owned(&so_pendfree_lock));
   
         for (;;) {          while (so_pendfree != NULL) {
                 struct mbuf *m;  
                 struct mbuf *next;  
   
                 m = so_pendfree;                  m = so_pendfree;
                 if (m == NULL)  
                         break;  
                 so_pendfree = NULL;                  so_pendfree = NULL;
                 mutex_exit(&so_pendfree_lock);                  mutex_exit(&so_pendfree_lock);
   
Line 319  sodopendfreel()
Line 316  sodopendfreel()
                         sodoloanfree((m->m_flags & M_EXT_PAGES) ?                          sodoloanfree((m->m_flags & M_EXT_PAGES) ?
                             m->m_ext.ext_pgs : NULL, m->m_ext.ext_buf,                              m->m_ext.ext_pgs : NULL, m->m_ext.ext_buf,
                             m->m_ext.ext_size);                              m->m_ext.ext_size);
                           s = splvm();
                         pool_cache_put(&mbpool_cache, m);                          pool_cache_put(&mbpool_cache, m);
                           splx(s);
                 }                  }
   
                 mutex_enter(&so_pendfree_lock);                  mutex_enter(&so_pendfree_lock);
Line 496  socreate(int dom, struct socket **aso, i
Line 495  socreate(int dom, struct socket **aso, i
         so->so_snd.sb_mowner = &prp->pr_domain->dom_mowner;          so->so_snd.sb_mowner = &prp->pr_domain->dom_mowner;
         so->so_mowner = &prp->pr_domain->dom_mowner;          so->so_mowner = &prp->pr_domain->dom_mowner;
 #endif  #endif
         if (l != NULL) {          uid = kauth_cred_geteuid(l->l_cred);
                 uid = kauth_cred_geteuid(l->l_cred);  
         } else {  
                 uid = 0;  
         }  
         so->so_uidinfo = uid_find(uid);          so->so_uidinfo = uid_find(uid);
         error = (*prp->pr_usrreq)(so, PRU_ATTACH, (struct mbuf *)0,          error = (*prp->pr_usrreq)(so, PRU_ATTACH, (struct mbuf *)0,
             (struct mbuf *)(long)proto, (struct mbuf *)0, l);              (struct mbuf *)(long)proto, (struct mbuf *)0, l);

Legend:
Removed from v.1.134.2.1  
changed lines
  Added in v.1.134.2.2

CVSweb <webmaster@jp.NetBSD.org>