net: Remove CONFIG_KMOD from net/ (towards removing CONFIG_KMOD entirely)
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / net / netlink / af_netlink.c
index 98bfe277eab22ef15ac39cd08185f0f63cc8030e..480184a857d21abdf72886d795679b64996399b1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * NETLINK      Kernel-user communication protocol.
  *
- *             Authors:        Alan Cox <alan@redhat.com>
+ *             Authors:        Alan Cox <alan@lxorguk.ukuu.org.uk>
  *                             Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
  *
  *             This program is free software; you can redistribute it and/or
@@ -158,9 +158,10 @@ static void netlink_sock_destruct(struct sock *sk)
                printk(KERN_ERR "Freeing alive netlink socket %p\n", sk);
                return;
        }
-       BUG_TRAP(!atomic_read(&sk->sk_rmem_alloc));
-       BUG_TRAP(!atomic_read(&sk->sk_wmem_alloc));
-       BUG_TRAP(!nlk_sk(sk)->groups);
+
+       WARN_ON(atomic_read(&sk->sk_rmem_alloc));
+       WARN_ON(atomic_read(&sk->sk_wmem_alloc));
+       WARN_ON(nlk_sk(sk)->groups);
 }
 
 /* This lock without WQ_FLAG_EXCLUSIVE is good on UP and it is _very_ bad on
@@ -434,7 +435,7 @@ static int netlink_create(struct net *net, struct socket *sock, int protocol)
                return -EPROTONOSUPPORT;
 
        netlink_lock_table();
-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES
        if (!nl_table[protocol].registered) {
                netlink_unlock_table();
                request_module("net-pf-%d-proto-%d", PF_NETLINK, protocol);