Re: Relax netlock to shared netlock and push it down to mrt_sysctl_mfc()

2023-05-26 Thread Alexander Bluhm
On Wed, May 17, 2023 at 01:02:58PM +0300, Vitaliy Makkoveev wrote: > mrt_rtwalk_mfcsysctl() performs read-only access to protected data, so > rtable_walk() could be called with shared netlock. While I think the NET_LOCK_SHARED() is not sufficent, you can move the NET_LOCK() into mrt_sysctl_mfc().

Re: Relax netlock to shared netlock and push it down to mrt_sysctl_mfc()

2023-05-26 Thread Alexander Bluhm
On Fri, May 26, 2023 at 06:25:46PM +0300, Vitaliy Makkoveev wrote: > On Fri, May 26, 2023 at 05:08:06PM +0200, Alexander Bluhm wrote: > > On Fri, May 26, 2023 at 05:29:58PM +0300, Vitaliy Makkoveev wrote: > > > On Wed, May 17, 2023 at 01:02:58PM +0300, Vitaliy Makkoveev wrote: > > > >

Re: Relax netlock to shared netlock and push it down to mrt_sysctl_mfc()

2023-05-26 Thread Vitaliy Makkoveev
On Fri, May 26, 2023 at 05:08:06PM +0200, Alexander Bluhm wrote: > On Fri, May 26, 2023 at 05:29:58PM +0300, Vitaliy Makkoveev wrote: > > On Wed, May 17, 2023 at 01:02:58PM +0300, Vitaliy Makkoveev wrote: > > > mrt_rtwalk_mfcsysctl() performs read-only access to protected data, so > > >

Re: Relax netlock to shared netlock and push it down to mrt_sysctl_mfc()

2023-05-26 Thread Alexander Bluhm
On Fri, May 26, 2023 at 05:29:58PM +0300, Vitaliy Makkoveev wrote: > On Wed, May 17, 2023 at 01:02:58PM +0300, Vitaliy Makkoveev wrote: > > mrt_rtwalk_mfcsysctl() performs read-only access to protected data, so > > rtable_walk() could be called with shared netlock. > > > > Regardless on

Re: Relax netlock to shared netlock and push it down to mrt_sysctl_mfc()

2023-05-26 Thread Vitaliy Makkoveev
On Wed, May 17, 2023 at 01:02:58PM +0300, Vitaliy Makkoveev wrote: > mrt_rtwalk_mfcsysctl() performs read-only access to protected data, so > rtable_walk() could be called with shared netlock. > Regardless on sysctl(2) unlocking backout, the netlock around mrt_sysctl_mfc() could be relaxed to

Relax netlock to shared netlock and push it down to mrt_sysctl_mfc()

2023-05-17 Thread Vitaliy Makkoveev
mrt_rtwalk_mfcsysctl() performs read-only access to protected data, so rtable_walk() could be called with shared netlock. Index: sys/netinet/ip_input.c === RCS file: /cvs/src/sys/netinet/ip_input.c,v retrieving revision 1.384 diff -u