]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - net/netfilter/nf_tables_api.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
[mirror_ubuntu-hirsute-kernel.git] / net / netfilter / nf_tables_api.c
index 0f58e98542be269a8dffc8b0f5c740d6534b2b15..9a080767667b7ff70de644aa9aebea84ad54c2d2 100644 (file)
@@ -619,7 +619,8 @@ static int nft_request_module(struct net *net, const char *fmt, ...)
 static void lockdep_nfnl_nft_mutex_not_held(void)
 {
 #ifdef CONFIG_PROVE_LOCKING
-       WARN_ON_ONCE(lockdep_nfnl_is_held(NFNL_SUBSYS_NFTABLES));
+       if (debug_locks)
+               WARN_ON_ONCE(lockdep_nfnl_is_held(NFNL_SUBSYS_NFTABLES));
 #endif
 }
 
@@ -1722,6 +1723,10 @@ static struct nft_hook *nft_netdev_hook_alloc(struct net *net,
        }
 
        nla_strlcpy(ifname, attr, IFNAMSIZ);
+       /* nf_tables_netdev_event() is called under rtnl_mutex, this is
+        * indirectly serializing all the other holders of the commit_mutex with
+        * the rtnl_mutex.
+        */
        dev = __dev_get_by_name(net, ifname);
        if (!dev) {
                err = -ENOENT;
@@ -3718,7 +3723,7 @@ cont:
        return 0;
 }
 
-static int nf_msecs_to_jiffies64(const struct nlattr *nla, u64 *result)
+int nf_msecs_to_jiffies64(const struct nlattr *nla, u64 *result)
 {
        u64 ms = be64_to_cpu(nla_get_be64(nla));
        u64 max = (u64)(~((u64)0));
@@ -3732,7 +3737,7 @@ static int nf_msecs_to_jiffies64(const struct nlattr *nla, u64 *result)
        return 0;
 }
 
-static __be64 nf_jiffies64_to_msecs(u64 input)
+__be64 nf_jiffies64_to_msecs(u64 input)
 {
        return cpu_to_be64(jiffies64_to_msecs(input));
 }