don't M_WAIT from interrupt level
authorMike Karels <karels@ucbvax.Berkeley.EDU>
Mon, 25 May 1987 13:21:18 +0000 (05:21 -0800)
committerMike Karels <karels@ucbvax.Berkeley.EDU>
Mon, 25 May 1987 13:21:18 +0000 (05:21 -0800)
SCCS-vsn: sys/netinet/ip_input.c 7.4

usr/src/sys/netinet/ip_input.c

index 2a7fd85..82f5a90 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)ip_input.c  7.3 (Berkeley) %G%
+ *     @(#)ip_input.c  7.4 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -300,7 +300,7 @@ ip_reass(ip, fp)
         * If first fragment to arrive, create a reassembly queue.
         */
        if (fp == 0) {
         * If first fragment to arrive, create a reassembly queue.
         */
        if (fp == 0) {
-               if ((t = m_get(M_WAIT, MT_FTABLE)) == NULL)
+               if ((t = m_get(M_DONTWAIT, MT_FTABLE)) == NULL)
                        goto dropfrag;
                fp = mtod(t, struct ipq *);
                insque(fp, &ipq);
                        goto dropfrag;
                fp = mtod(t, struct ipq *);
                insque(fp, &ipq);
@@ -730,7 +730,9 @@ ip_srcroute()
 
        if (ip_nhops == 0)
                return ((struct mbuf *)0);
 
        if (ip_nhops == 0)
                return ((struct mbuf *)0);
-       m = m_get(M_WAIT, MT_SOOPTS);
+       m = m_get(M_DONTWAIT, MT_SOOPTS);
+       if (m == 0)
+               return ((struct mbuf *)0);
        m->m_len = ip_nhops * sizeof(struct in_addr) + IPOPT_OFFSET + 1 + 1;
 
        /*
        m->m_len = ip_nhops * sizeof(struct in_addr) + IPOPT_OFFSET + 1 + 1;
 
        /*