From: Eric Weigle <ehw@lanl.gov>
To: linux-kernel@vger.kernel.org
Subject: Trivial bug/fix for shm.c
Date: Thu, 22 Feb 2001 14:04:47 -0700 [thread overview]
Message-ID: <3A957EEF.B6823940@lanl.gov> (raw)
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/
--------------------------------------------
reply other threads:[~2001-02-22 21:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3A957EEF.B6823940@lanl.gov \
--to=ehw@lanl.gov \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox