lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 27 Dec 2007 14:48:56 +0200
From:	Octavian Purdila <tavi@...pub.ro>
To:	netdev@...r.kernel.org
Subject: netlink_proto_init and sock_init


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@...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);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ