On Tue, Apr 30, 2024 at 05:26:15PM +0300, Vitaliy Makkoveev wrote:
> On Tue, Apr 30, 2024 at 04:06:29PM +0200, Mark Kettenis wrote:
> > > Date: Tue, 30 Apr 2024 16:18:31 +0300
> > > From: Vitaliy Makkoveev <m...@openbsd.org>
> > > 
> > > On Tue, Apr 30, 2024 at 11:08:13AM +0200, Martin Pieuchot wrote:
> > > > 
> > > > On the other side, would that make sense to have a NET_LOCK()-free
> > > > sysctl path?
> > > > 
> > > 
> > > To me it's better to remove uvm_vslock() from network related sysctl
> > > paths. uvm_vslock() used to avoid context switch in the uiomove() call
> > > to not break kernel lock protected data. It is not required for netlock
> > > protected network stuff.
> > 
> > I don't think uvm_vslock() plays a role in the lock order reversal
> > being discussed here.
> > 
> 
> copyin() and copyout() don't sleep while called from sysctl() paths. At
> least it is supposed. 

copyout() does not sleep.  The uvm_vslock() is in if(SCARG(uap, old)).
So copyin() may sleep.  See comment in my sysctl int atomic diff.

bluhm

Reply via email to