* Trivial bug/fix for shm.c
@ 2001-02-22 21:04 Eric Weigle
0 siblings, 0 replies; only message in thread
From: Eric Weigle @ 2001-02-22 21:04 UTC (permalink / raw)
To: linux-kernel
I couldn't find the maintainer for this, so I'm sending it to the list.
Problem: ipc/shm.c currently assumes proc filesystem exists, so if
CONFIG_PROC_FS is not defined, it will not compile. The function shm_init calls
create_proc_read_entry without checking if CONFIG_PROC_FS defined; if it isn't
defined that functionality should not be referenced.
Solution: add appropriate #ifdef around that line:
--------------------------------------------------------------------------------
--- kernel-2.4.2/ipc/shm.c.orig Thu Feb 22 13:13:47 2001
+++ kernel-2.4.2/ipc/shm.c Thu Feb 22 13:13:57 2001
@@ -71,7 +71,9 @@
void __init shm_init (void)
{
ipc_init_ids(&shm_ids, 1);
+#ifdef CONFIG_PROC_FS
create_proc_read_entry("sysvipc/shm", 0, 0, sysvipc_shm_read_proc, NULL);
+#endif
}
static inline int shm_checkid(struct shmid_kernel *s, int id)
--------------------------------------------------------------------------------
I encountered this bug while creating a vastly hacked-down special purpose
kernel without /proc support.
Thanks,
-Eric Weigle
--------------------------------------------
Eric H. Weigle CCS-1, RADIANT team
ehw@lanl.gov Los Alamos National Lab
(505) 665-4937 http://home.lanl.gov/ehw/
--------------------------------------------
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-02-22 21:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-22 21:04 Trivial bug/fix for shm.c Eric Weigle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.