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>] [day] [month] [year] [list]
Date:	Tue, 26 Feb 2008 22:25:16 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	netdev@...r.kernel.org
CC:	xemul@...nvz.org
Subject: [PATCH]: af_key procfs OOPS fix


FYI, I just checked in the following bug fix.  My workstation would
OOPS every time I'd restart openswan because of this.

commit d9595a7b9c777d45a74774f1428c263a0a47f4c0
Author: David S. Miller <davem@...emloft.net>
Date:   Tue Feb 26 22:20:44 2008 -0800

    [AF_KEY]: Fix oops by converting to proc_net_*().
    
    To make sure the procfs visibility occurs after the ->proc_fs ops are
    setup, use proc_net_fops_create() and proc_net_remove().
    
    This also fixes an OOPS after module unload in that the name string
    for remove was wrong, so it wouldn't actually be removed.  That bug
    was introduced by commit 61145aa1a12401ac71bcc450a58c773dd6e2bfb9
    ("[KEY]: Clean up proc files creation a bit.")
    
    Signed-off-by: David S. Miller <davem@...emloft.net>

diff --git a/net/key/af_key.c b/net/key/af_key.c
index 1c85392..8b5f486 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -3807,17 +3807,16 @@ static int pfkey_init_proc(void)
 {
 	struct proc_dir_entry *e;
 
-	e = create_proc_entry("pfkey", 0, init_net.proc_net);
+	e = proc_net_fops_create(&init_net, "pfkey", 0, &pfkey_proc_ops);
 	if (e == NULL)
 		return -ENOMEM;
 
-	e->proc_fops = &pfkey_proc_ops;
 	return 0;
 }
 
 static void pfkey_exit_proc(void)
 {
-	remove_proc_entry("net/pfkey", NULL);
+	proc_net_remove(&init_net, "pfkey");
 }
 #else
 static inline int pfkey_init_proc(void)
--
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