On Fri, Apr 21, 2023 at 05:17:46PM +0300, Vitaliy Makkoveev wrote:
> At least network subset of sysctl(8) MIBs relies on netlock or another
> locks and doesn't require kernel lock. Also some integers in other
> subsets can be read without kernel lock held.
> 
> Diff below actually pushes kernel lock down to net_sysctl(). It is
> required for MPLS and PFLOW cases. The protocol *_sysctls() are left
> under kernel lock to make the review of this diff easier. I want to
> sequentially unlock them later. The rest of cases are easy to review.
> net_lisnk_sysctl() only calls net_ifq_sysctl() which only returns error.
> unp_sysctl() does access to integer variables, which are already
> accessed in uipc_attach() without kernel lock held. pipex_sysctl() also
> accesses integer variable which is lockless accessed in the
> pppx(4)/pipex(4) layer.
> 
> ok?

OK bluhm@

> @@ -183,8 +183,8 @@ net_link_sysctl(int *name, u_int namelen
>  }
>  
>  int
> -net_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
> -    size_t newlen, struct proc *p)
> +net_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp,
> +    void *newp, size_t newlen, struct proc *p)

The old code fits in my 80 columns terminal.  No need break the line.

Reply via email to