On Mon, Sep 12, 2016 at 11:15:21AM +0200, Martin Pieuchot wrote:
> soaccept() is always called at IPL_SOFTNET, so assert it instead of
> raising the SPL level recursively. This is not a problem currently
> but will be one as soon as we use a non-recursive rwlock.
>
> ok?
OK claudio (I bet there is more such recursivness all over the place)
> Index: kern/uipc_socket.c
> ===================================================================
> RCS file: /cvs/src/sys/kern/uipc_socket.c,v
> retrieving revision 1.157
> diff -u -p -r1.157 uipc_socket.c
> --- kern/uipc_socket.c 3 Sep 2016 14:09:58 -0000 1.157
> +++ kern/uipc_socket.c 12 Sep 2016 09:13:29 -0000
> @@ -300,9 +300,10 @@ soabort(struct socket *so)
> int
> soaccept(struct socket *so, struct mbuf *nam)
> {
> - int s = splsoftnet();
> int error = 0;
>
> + splsoftassert(IPL_SOFTNET);
> +
> if ((so->so_state & SS_NOFDREF) == 0)
> panic("soaccept !NOFDREF: so %p, so_type %d", so, so->so_type);
> so->so_state &= ~SS_NOFDREF;
> @@ -312,7 +313,6 @@ soaccept(struct socket *so, struct mbuf
> nam, NULL, curproc);
> else
> error = ECONNABORTED;
> - splx(s);
> return (error);
> }
>
>
--
:wq Claudio