Author: kmacy
Date: Mon Feb  2 23:04:20 2009
New Revision: 188036
URL: http://svn.freebsd.org/changeset/base/188036

Log:
  break out of loop if we run out of mbufs

Modified:
  head/sys/dev/xen/netfront/netfront.c

Modified: head/sys/dev/xen/netfront/netfront.c
==============================================================================
--- head/sys/dev/xen/netfront/netfront.c        Mon Feb  2 22:18:48 2009        
(r188035)
+++ head/sys/dev/xen/netfront/netfront.c        Mon Feb  2 23:04:20 2009        
(r188036)
@@ -1234,11 +1234,12 @@ xennet_get_responses(struct netfront_inf
                gnttab_release_grant_reference(&np->gref_rx_head, ref);
 
 next:
-               if (m != NULL) {
-                               m->m_len = rx->status;
-                               m->m_data += rx->offset;
-                               m0->m_pkthdr.len += rx->status;
-               }
+               if (m == NULL)
+                       break;
+               
+               m->m_len = rx->status;
+               m->m_data += rx->offset;
+               m0->m_pkthdr.len += rx->status;
                
                if (!(rx->flags & NETRXF_more_data))
                        break;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to