From: Andy P. <at...@us...> - 2002-04-09 16:29:07
|
Update of /cvsroot/linux-vax/kernel-2.4/net/netlink In directory usw-pr-cvs1:/tmp/cvs-serv32481/netlink Modified Files: af_netlink.c netlink_dev.c Log Message: synch 2.4.15 commit 21 Index: af_netlink.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/net/netlink/af_netlink.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- af_netlink.c 25 Feb 2001 23:14:56 -0000 1.1.1.2 +++ af_netlink.c 9 Apr 2002 16:29:01 -0000 1.2 @@ -9,6 +9,9 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * + * Tue Jun 26 14:36:48 MEST 2001 Herbert "herp" Rosmanith + * added netlink_proto_exit + * */ #include <linux/config.h> @@ -962,6 +965,7 @@ sendmsg: netlink_sendmsg, recvmsg: netlink_recvmsg, mmap: sock_no_mmap, + sendpage: sock_no_sendpage, }; struct net_proto_family netlink_family_ops = { @@ -984,4 +988,11 @@ return 0; } +static void __exit netlink_proto_exit(void) +{ + sock_unregister(PF_NETLINK); + remove_proc_entry("net/netlink", NULL); +} + module_init(netlink_proto_init); +module_exit(netlink_proto_exit); Index: netlink_dev.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/net/netlink/netlink_dev.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- netlink_dev.c 25 Feb 2001 23:14:56 -0000 1.1.1.2 +++ netlink_dev.c 9 Apr 2002 16:29:01 -0000 1.2 @@ -28,10 +28,11 @@ #include <linux/devfs_fs_kernel.h> #include <linux/smp_lock.h> +#include <asm/bitops.h> #include <asm/system.h> #include <asm/uaccess.h> -static unsigned open_map; +static long open_map; static struct socket *netlink_user[MAX_LINKS]; /* @@ -111,11 +112,9 @@ if (minor>=MAX_LINKS) return -ENODEV; - if (open_map&(1<<minor)) + if (test_and_set_bit(minor, &open_map)) return -EBUSY; - open_map |= (1<<minor); - err = sock_create(PF_NETLINK, SOCK_RAW, minor, &sock); if (err < 0) goto out; @@ -132,7 +131,7 @@ return 0; out: - open_map &= ~(1<<minor); + clear_bit(minor, &open_map); return err; } @@ -141,11 +140,9 @@ unsigned int minor = MINOR(inode->i_rdev); struct socket *sock; - lock_kernel(); sock = netlink_user[minor]; netlink_user[minor] = NULL; - open_map &= ~(1<<minor); - unlock_kernel(); + clear_bit(minor, &open_map); sock_release(sock); return 0; } |