On Mon, Nov 21, 2016 at 12:29:04PM +0100, Martin Pieuchot wrote:
> @@ -1034,8 +1036,11 @@ sys_getsockopt(struct proc *p, void *v,
> goto out;
> } else
> valsize = 0;
> - if ((error = sogetopt(fp->f_data, SCARG(uap, level),
> - SCARG(uap, name), &m)) == 0 && SCARG(uap, val) && valsize &&
> +
> + s = splsoftnet();
> + error = sogetopt(fp->f_data, SCARG(uap, level), SCARG(uap, name), &m);
> + splx(s);
> + if (error == 0 && SCARG(uap, val) && valsize &&
> m != NULL) {
This if() fits in a single line.
> @@ -1544,6 +1544,8 @@ sosetopt(struct socket *so, int level, i
> int error = 0;
> struct mbuf *m = m0;
>
> + splsoftassert(IPL_SOFTNET);
> +
> if (level != SOL_SOCKET) {
> if (so->so_proto && so->so_proto->pr_ctloutput)
> return ((*so->so_proto->pr_ctloutput)
There are a bunch of calls to sosetopt() in bfd and nfs that are
not protected by splsoftnet().
bluhm