int nf_msecs_to_jiffies64(const struct nlattr *nla, u64 *result);
 __be64 nf_jiffies64_to_msecs(u64 input);
 
+#ifdef CONFIG_MODULES
+__printf(2, 3) int nft_request_module(struct net *net, const char *fmt, ...);
+#else
+static inline int nft_request_module(struct net *net, const char *fmt, ...) { return -ENOENT; }
+#endif
 #endif /* _NET_NF_TABLES_H */
 
                return 0;
        }
 
-       if (rcu_access_pointer(loggers[pf][type]) == NULL)
-               request_module("nf-logger-%u-%u", pf, type);
-
        rcu_read_lock();
        logger = rcu_dereference(loggers[pf][type]);
        if (logger == NULL)
 
 };
 
 #ifdef CONFIG_MODULES
-static __printf(2, 3) int nft_request_module(struct net *net, const char *fmt,
-                                            ...)
+__printf(2, 3) int nft_request_module(struct net *net, const char *fmt,
+                                     ...)
 {
        char module_name[MODULE_NAME_LEN];
        struct nft_module_request *req;
 
        return -EAGAIN;
 }
+EXPORT_SYMBOL_GPL(nft_request_module);
 #endif
 
 static void lockdep_nfnl_nft_mutex_not_held(void)
 
        [NFTA_LOG_FLAGS]        = { .type = NLA_U32 },
 };
 
+static int nft_log_modprobe(struct net *net, enum nf_log_type t)
+{
+       switch (t) {
+       case NF_LOG_TYPE_LOG:
+               return nft_request_module(net, "%s", "nf_log_syslog");
+       case NF_LOG_TYPE_ULOG:
+               return nft_request_module(net, "%s", "nfnetlink_log");
+       case NF_LOG_TYPE_MAX:
+               break;
+       }
+
+       return -ENOENT;
+}
+
 static int nft_log_init(const struct nft_ctx *ctx,
                        const struct nft_expr *expr,
                        const struct nlattr * const tb[])
                return 0;
 
        err = nf_logger_find_get(ctx->family, li->type);
-       if (err < 0)
+       if (err < 0) {
+               if (nft_log_modprobe(ctx->net, li->type) == -EAGAIN)
+                       err = -EAGAIN;
+
                goto err1;
+       }
 
        return 0;