]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: dummy: request ops lock
authorStanislav Fomichev <sdf@fomichev.me>
Tue, 1 Apr 2025 16:34:47 +0000 (09:34 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 3 Apr 2025 22:32:08 +0000 (15:32 -0700)
Even though dummy device doesn't really need an instance lock,
a lot of selftests use dummy so it's useful to have extra
expose to the instance lock on NIPA. Request the instance/ops
locking.

Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20250401163452.622454-7-sdf@fomichev.me
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dummy.c

index a4938c6a5ebb5a6de8be990b0809d09253a26c4d..d6bdad4baadd803157b1f04e48f77c474b6584d9 100644 (file)
@@ -105,6 +105,7 @@ static void dummy_setup(struct net_device *dev)
        dev->netdev_ops = &dummy_netdev_ops;
        dev->ethtool_ops = &dummy_ethtool_ops;
        dev->needs_free_netdev = true;
+       dev->request_ops_lock = true;
 
        /* Fill in device structure with ethernet-generic values. */
        dev->flags |= IFF_NOARP;