lkml.org 
[lkml]   [2000]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 2.4.0-test7-pre3 and rtnetlink oops
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/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.023 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site