On Mon, Sep 04, 2017 at 10:03:32AM +0200, Martin Pieuchot wrote:
> For some of them it happens to be the NET_LOCK(), but not all of them
> need it.  So use the correct macro.

For consistency rip6_usrreq() and divert6_usrreq() should get that, too.

> ok?

OK bluhm@

> Index: net/rtsock.c
> ===================================================================
> RCS file: /cvs/src/sys/net/rtsock.c,v
> retrieving revision 1.249
> diff -u -p -r1.249 rtsock.c
> --- net/rtsock.c      1 Sep 2017 15:05:31 -0000       1.249
> +++ net/rtsock.c      4 Sep 2017 08:00:14 -0000
> @@ -177,6 +177,8 @@ route_usrreq(struct socket *so, int req,
>       int              af;
>       int              error = 0;
>  
> +     soassertlocked(so);
> +
>       rop = sotoroutecb(so);
>       if (rop == NULL) {
>               m_freem(m);
> Index: netinet/ip_divert.c
> ===================================================================
> RCS file: /cvs/src/sys/netinet/ip_divert.c,v
> retrieving revision 1.49
> diff -u -p -r1.49 ip_divert.c
> --- netinet/ip_divert.c       27 Jul 2017 12:04:42 -0000      1.49
> +++ netinet/ip_divert.c       4 Sep 2017 08:00:14 -0000
> @@ -248,7 +248,7 @@ divert_usrreq(struct socket *so, int req
>       struct inpcb *inp = sotoinpcb(so);
>       int error = 0;
>  
> -     NET_ASSERT_LOCKED();
> +     soassertlocked(so);
>  
>       if (req == PRU_CONTROL) {
>               return (in_control(so, (u_long)m, (caddr_t)addr,
> Index: netinet/raw_ip.c
> ===================================================================
> RCS file: /cvs/src/sys/netinet/raw_ip.c,v
> retrieving revision 1.102
> diff -u -p -r1.102 raw_ip.c
> --- netinet/raw_ip.c  1 Sep 2017 15:05:31 -0000       1.102
> +++ netinet/raw_ip.c  4 Sep 2017 08:00:14 -0000
> @@ -392,7 +392,7 @@ rip_usrreq(struct socket *so, int req, s
>       struct inpcb *inp = sotoinpcb(so);
>       int error = 0;
>  
> -     NET_ASSERT_LOCKED();
> +     soassertlocked(so);
>  
>       if (req == PRU_CONTROL)
>               return (in_control(so, (u_long)m, (caddr_t)nam,
> Index: netinet/tcp_usrreq.c
> ===================================================================
> RCS file: /cvs/src/sys/netinet/tcp_usrreq.c,v
> retrieving revision 1.154
> diff -u -p -r1.154 tcp_usrreq.c
> --- netinet/tcp_usrreq.c      1 Sep 2017 15:05:31 -0000       1.154
> +++ netinet/tcp_usrreq.c      4 Sep 2017 08:00:14 -0000
> @@ -131,7 +131,7 @@ tcp_usrreq(struct socket *so, int req, s
>       int error = 0;
>       short ostate;
>  
> -     NET_ASSERT_LOCKED();
> +     soassertlocked(so);
>  
>       if (req == PRU_CONTROL) {
>  #ifdef INET6
> Index: netinet/udp_usrreq.c
> ===================================================================
> RCS file: /cvs/src/sys/netinet/udp_usrreq.c,v
> retrieving revision 1.239
> diff -u -p -r1.239 udp_usrreq.c
> --- netinet/udp_usrreq.c      11 Aug 2017 19:53:02 -0000      1.239
> +++ netinet/udp_usrreq.c      4 Sep 2017 08:00:14 -0000
> @@ -1060,7 +1060,7 @@ udp_usrreq(struct socket *so, int req, s
>       struct inpcb *inp;
>       int error = 0;
>  
> -     NET_ASSERT_LOCKED();
> +     soassertlocked(so);
>  
>       if (req == PRU_CONTROL) {
>  #ifdef INET6

Reply via email to