Hi Linus,
maybe you already received patch for this, but there are two problems with
net/socket.c:
(1) use 'inode' before verifying for NULL
(2) registering sock_fs_type after rtnetlink_init; rtnetlink_init needs
sock_alloc; sock_alloc needs sock_mnt != NULL ...
Thanks,
Petr Vandrovec
vandrove@vc.cvut.cz
diff -urdN linux/net/socket.c linux/net/socket.c
--- linux/net/socket.c Mon Aug 14 08:39:20 2000
+++ linux/net/socket.c Mon Aug 14 10:00:50 2000
@@ -440,10 +440,11 @@
struct socket * sock;
inode = get_empty_inode();
- inode->i_sb = sock_mnt->mnt_sb;
+
if (!inode)
return NULL;
+ inode->i_sb = sock_mnt->mnt_sb;
sock = socki_lookup(inode);
inode->i_mode = S_IFSOCK|S_IRWXUGO;
@@ -1716,6 +1717,9 @@
* The netlink device handler may be needed early.
*/
+ register_filesystem(&sock_fs_type);
+ sock_mnt = kern_mount(&sock_fs_type);
+
#ifdef CONFIG_RTNETLINK
rtnetlink_init();
#endif
@@ -1725,8 +1729,6 @@
#ifdef CONFIG_NETFILTER
netfilter_init();
#endif
- register_filesystem(&sock_fs_type);
- sock_mnt = kern_mount(&sock_fs_type);
}
int socket_get_info(char *buffer, char **start, off_t offset, int length)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:33 EST