These functions are only called by udp_usrreq() which is always called
with the NET_LOCK() held, so kill redundant splsoftnet().

ok?

Index: netinet/udp_usrreq.c
===================================================================
RCS file: /cvs/src/sys/netinet/udp_usrreq.c,v
retrieving revision 1.225
diff -u -p -r1.225 udp_usrreq.c
--- netinet/udp_usrreq.c        19 Dec 2016 08:36:49 -0000      1.225
+++ netinet/udp_usrreq.c        19 Dec 2016 11:22:16 -0000
@@ -1029,9 +1029,7 @@ udp_output(struct inpcb *inp, struct mbu
                        goto release;
 
                if (inp->inp_lport == 0) {
-                       int s = splsoftnet();
                        error = in_pcbbind(inp, NULL, curproc);
-                       splx(s);
                        if (error)
                                goto release;
                }
Index: netinet6/udp6_output.c
===================================================================
RCS file: /cvs/src/sys/netinet6/udp6_output.c,v
retrieving revision 1.52
diff -u -p -r1.52 udp6_output.c
--- netinet6/udp6_output.c      18 Nov 2016 02:53:47 -0000      1.52
+++ netinet6/udp6_output.c      19 Dec 2016 11:22:50 -0000
@@ -159,9 +159,7 @@ udp6_output(struct inpcb *in6p, struct m
                        goto release;
 
                if (in6p->inp_lport == 0){
-                       int s = splsoftnet();
                        error = in_pcbbind(in6p, NULL, p);
-                       splx(s);
                        if (error)
                                goto release;
                }

Reply via email to