Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jul 2003 11:31:55 -0400
From:      Don Bowman <don@sandvine.com>
To:        Don Bowman <don@sandvine.com>, "'freebsd-net@freebsd.org'" <freebsd-net@freebsd.org>
Subject:   RE: splx() bug in ip_dummynet?
Message-ID:  <FE045D4D9F7AED4CBFF1B3B813C8533702741F84@mail.sandvine.com>

next in thread | raw e-mail | index | archive | help
From: Don Bowman [mailto:don@sandvine.com]

 ...

I believe this patch will correct the issue.

Index: ip_dummynet.c
===================================================================
RCS file: /usr/cvs/src/sys/netinet/ip_dummynet.c,v
retrieving revision 1.24.2.17.1000.1
retrieving revision 1.24.2.17.1000.2
diff -U3 -r1.24.2.17.1000.1 -r1.24.2.17.1000.2
--- ip_dummynet.c       21 Jun 2003 20:47:59 -0000      1.24.2.17.1000.1
+++ ip_dummynet.c       24 Jul 2003 15:27:59 -0000      1.24.2.17.1000.2
@@ -1571,10 +1571,12 @@
 
 
        if ( x->fs.rq == NULL ) { /* a new pipe */
-           s = alloc_hash(&(x->fs), pfs) ;
-           if (s) {
+           int s1;
+           s1 = alloc_hash(&(x->fs), pfs) ;
+           if (s1) {
                free(x, M_DUMMYNET);
-               return s ;
+               splx(s);
+               return s1 ;
            }
            x->next = b ;
            if (a == NULL)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FE045D4D9F7AED4CBFF1B3B813C8533702741F84>