From: Manfred Spraul register_sysctl_table() fails if sysctl support is not compiled into the kernel. The POSIX message queue subsystem aborted it's initialization if register_sysctl_table() fails, and that causes an oops in sys_mq_open(). The patch fixes that by ignoring failures from register_sysctl_table(). Signed-Off-By; Manfred Spraul Signed-off-by: Andrew Morton --- 25-akpm/ipc/mqueue.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff -puN ipc/mqueue.c~handle-posix-message-queues-with-proc-sys-disabled ipc/mqueue.c --- 25/ipc/mqueue.c~handle-posix-message-queues-with-proc-sys-disabled 2004-10-26 20:06:07.366948528 -0700 +++ 25-akpm/ipc/mqueue.c 2004-10-26 20:06:07.370947920 -0700 @@ -1219,11 +1219,8 @@ static int __init init_mqueue_fs(void) if (mqueue_inode_cachep == NULL) return -ENOMEM; + /* ignore failues - they are not fatal */ mq_sysctl_table = register_sysctl_table(mq_sysctl_root, 0); - if (!mq_sysctl_table) { - error = -ENOMEM; - goto out_cache; - } error = register_filesystem(&mqueue_fs_type); if (error) @@ -1243,7 +1240,8 @@ static int __init init_mqueue_fs(void) out_filesystem: unregister_filesystem(&mqueue_fs_type); out_sysctl: - unregister_sysctl_table(mq_sysctl_table); + if (mq_sysctl_table) + unregister_sysctl_table(mq_sysctl_table); out_cache: if (kmem_cache_destroy(mqueue_inode_cachep)) { printk(KERN_INFO _