# Re: \[PATCH net-next v2\] net: opt loopback into instance locking

- From: Stanislav Fomichev \<hidden\>
- Date: 2026-09-22 19:21:49 
- List: netdev
- Page: https://ratatoskr.run/netdev/2026/09/17624351
- Thread: https://ratatoskr.run/netdev/2026/09/17617285/t.md

```text
On 09/22, Jakub Kicinski wrote:
> On Mon, 21 Sep 2026 14:14:19 -0700 Stanislav Fomichev wrote:
> > On 09/21, Jakub Kicinski wrote:
> > > Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> > > ---
> > > v2:
> > >  - move setting the request flag from gen_lo_setup() to loopback_setup()
> > >    to avoid splats on the blackhole dev which we don't care about  
> > 
> > Acked-by: Stanislav Fomichev <sdf@fomichev.me>
> > 
> > (mostly because dummy is also ops locked, don't think loopback should
> > bring any problems)
> 
> Stan, the issue Matt reported in the BPF CI is a generic sw device +
> netdev lock issue. We are triggering it on lo because.. probability,
> but it reproduces with dummy + netkit already today.
> 
> Do you recall why we have separate classes for each device type?
> 
> Classes make the lock_set_cmp_fn() ineffective across different device
> types. Quick test removing the classes and sticking to just the cmp fn
> seems make lockdep happy, I'm running the ksft suite now. But maybe you
> can tell me if it's the right idea before it finishes..?

No, I don't think there is a reason we added both. It might have been
that we started with a class and then added cmp_fn on top. This whole
function is a 10+ years of whack-a-mole with lockdep :-( Agreed that
removing class (which prevents cmp_fn from working properly across
all instance locks) sounds sensible.
```
