From: Linus Torvalds <[email protected]>
Date: Sun, 25 May 2003 15:12:28 -0700 (PDT)
Davem? Who uses this thing?
[ was away past 2 days, sorry... ]
I doubt any users of netlink "devices" exist in nature anymore.
I remember in 2.2.x we marked it as deprecated. :-)
That being said, you should be able to safely use module_init() there.
On Sun, 25 May 2003, David S. Miller wrote:
>
> That being said, you should be able to safely use module_init() there.
Mind testing (and pushing back if ok) something like this, then?
Linus
---
===== include/linux/netlink.h 1.10 vs edited =====
--- 1.10/include/linux/netlink.h Sun Apr 6 06:03:54 2003
+++ edited/include/linux/netlink.h Sun May 25 19:20:21 2003
@@ -108,7 +108,6 @@
extern int netlink_attach(int unit, int (*function)(int,struct sk_buff *skb));
extern void netlink_detach(int unit);
extern int netlink_post(int unit, struct sk_buff *skb);
-extern int init_netlink(void);
extern struct sock *netlink_kernel_create(int unit, void (*input)(struct sock *sk, int len));
extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err);
extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock);
===== net/netlink/af_netlink.c 1.24 vs edited =====
--- 1.24/net/netlink/af_netlink.c Wed May 14 19:19:15 2003
+++ edited/net/netlink/af_netlink.c Sun May 25 19:12:23 2003
@@ -1070,9 +1070,6 @@
#endif
/* The netlink device handler may be needed early. */
rtnetlink_init();
-#ifdef CONFIG_NETLINK_DEV
- init_netlink();
-#endif
return 0;
}
===== net/netlink/netlink_dev.c 1.17 vs edited =====
--- 1.17/net/netlink/netlink_dev.c Tue May 20 19:39:24 2003
+++ edited/net/netlink/netlink_dev.c Sun May 25 19:14:21 2003
@@ -220,7 +220,7 @@
},
};
-int __init init_netlink(void)
+static int __init init_netlink(void)
{
int i;
@@ -245,17 +245,7 @@
return 0;
}
-#ifdef MODULE
-
-MODULE_LICENSE("GPL");
-
-int init_module(void)
-{
- printk(KERN_INFO "Network Kernel/User communications module 0.04\n");
- return init_netlink();
-}
-
-void cleanup_module(void)
+static void __exit cleanup_netlink(void)
{
int i;
@@ -267,4 +257,6 @@
unregister_chrdev(NETLINK_MAJOR, "netlink");
}
-#endif
+MODULE_LICENSE("GPL");
+__initcall(init_netlink);
+__exitcall(cleanup_netlink);
From: Linus Torvalds <[email protected]>
Date: Sun, 25 May 2003 19:22:56 -0700 (PDT)
On Sun, 25 May 2003, David S. Miller wrote:
>
> That being said, you should be able to safely use module_init() there.
Mind testing (and pushing back if ok) something like this, then?
I will, except I'll use module_init() and module_exit() instead
of __initcall and __exitcall.
On Sun, May 25, 2003 at 07:22:56PM -0700, Linus Torvalds wrote:
> +__initcall(init_netlink);
> +__exitcall(cleanup_netlink);
Err... That should be
+module_init(init_netlink)
+module_exit(cleanup_netlink)
From: [email protected]
Date: Mon, 26 May 2003 03:50:16 +0100
Err... That should be
+module_init(init_netlink)
+module_exit(cleanup_netlink)
That's exactly what I said.
Al, are you able to read any of my emails? I sent you one last week
with a patch for fs/proc/task_mmu.c warnings on 64-bit and it
aparently went to the bit bucket... maybe all my mails aren't
making it your way :(
On Sun, May 25, 2003 at 07:55:41PM -0700, David S. Miller wrote:
> From: [email protected]
> Date: Mon, 26 May 2003 03:50:16 +0100
>
> Err... That should be
>
> +module_init(init_netlink)
> +module_exit(cleanup_netlink)
>
> That's exactly what I said.
Yeah - I saw your mail right after I'd sent reply.
> Al, are you able to read any of my emails? I sent you one last week
> with a patch for fs/proc/task_mmu.c warnings on 64-bit and it
> aparently went to the bit bucket...
Looks like that one had ;-/ Resend it, OK?