From: Octavian Purdila <tavi@cs.pub.ro>
To: netdev@vger.kernel.org
Subject: netlink_proto_init and sock_init
Date: Thu, 27 Dec 2007 14:48:56 +0200 [thread overview]
Message-ID: <200712271448.57008.tavi@cs.pub.ro> (raw)
Hi,
I've noticed that with some exotic build setups (e.g. mingw)
netlink_proto_init is called before sock_init and subsequently sock_alloc
runs into a NULL sock_mnt. The following patch seems to fix the problem, but
I'm not sure if this is the right thing to do, as there are no _initcall_sync
calls in the kernel yet.
Thanks,
tavi
PS: please keep me on CC as I am not subscribed to the list.
Author: Octavian Purdila <tavi@cs.pub.ro>
Date: Thu Dec 27 14:25:31 2007 +0200
sock_init needs to be called before netlink_proto_init, but both
sock_init and netlink_proto_init share the same init level
(core). Move netlink_proto_init to sync core level.
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 1f15821..f69c126 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1845,7 +1845,7 @@ panic:
panic("netlink_init: Cannot allocate nl_table\n");
}
-core_initcall(netlink_proto_init);
+core_initcall_sync(netlink_proto_init);
EXPORT_SYMBOL(netlink_ack);
EXPORT_SYMBOL(netlink_run_queue);
next reply other threads:[~2007-12-27 12:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-27 12:48 Octavian Purdila [this message]
2007-12-28 0:41 ` netlink_proto_init and sock_init David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200712271448.57008.tavi@cs.pub.ro \
--to=tavi@cs.pub.ro \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.