On Mon, Nov 21, 2016 at 04:03:51PM +0100, Martin Pieuchot wrote:
> On 21/11/16(Mon) 15:17, Alexander Bluhm wrote:
> > [...] 
> > There are a bunch of calls to sosetopt() in bfd and nfs that are
> > not protected by splsoftnet().
> 
> Indeed.  Then I believe putting the splsoftnet() inside sosetopt() is
> a better solution.

I think this is more consistent.  Most other syscall functions in
uipc_socket.c do the splsoftnet() themselves.


> @@ -1718,8 +1725,10 @@ sosetopt(struct socket *so, int level, i
>                       break;
>               }
>               if (error == 0 && so->so_proto && so->so_proto->pr_ctloutput) {
> -                     (void) ((*so->so_proto->pr_ctloutput)
> -                               (PRCO_SETOPT, so, level, optname, &m0));
> +                     s = splsoftnet();
> +                     (*so->so_proto->pr_ctloutput)(PRCO_SETOPT, so,
> +                         level, optname, &m0);
> +                     splx(s);
>                       m = NULL;       /* freed by protocol */
>               }
>       }

Could you keep the (void) to show that the error is ignored
intentionally?

anyway OK bluhm@

Reply via email to