[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <91b13c310901042312o44afa166t66b23e8ad10d104f@mail.gmail.com>
Date: Mon, 5 Jan 2009 15:12:33 +0800
From: "Cheng Renquan (程任全)"
<crquan@...il.com>
To: "Arjan van de Ven" <arjan@...ux.intel.com>,
"Al Viro" <viro@...iv.linux.org.uk>,
"Matt Helsley" <matthltc@...ibm.com>,
"Andrew Morton" <akpm@...ux-foundation.org>,
"Linus Torvalds" <torvalds@...ux-foundation.org>,
"Adrian Bunk" <bunk@...nel.org>,
"Ananth N Mavinakayanahalli" <ananth@...ibm.com>,
anil.s.keshavamurthy@...el.com, davem@...emloft.net,
mhiramat@...hat.com
Cc: linux-kernel@...r.kernel.org
Subject: KPROBE linking error (who's the maintainer of kernel/power/) ?
with this .config
CONFIG_CGROUPS=y
CONFIG_CGROUP_FREEZER=y
CONFIG_MODULES=y
CONFIG_FREEZER=y
CONFIG_PM=y
CONFIG_PM_SLEEP=n
the kernel will end compiling with error:
kernel/built-in.o: In function `check_safety':
/usr/src/linux-2.6.28/kernel/kprobes.c:126: undefined reference to
`freeze_processes'
/usr/src/linux-2.6.28/kernel/kprobes.c:139: undefined reference to
`thaw_processes'
/usr/src/linux-2.6.28/kernel/kprobes.c:139: undefined reference to
`thaw_processes'
make: *** [.tmp_vmlinux1] Error 1
By read kernel/kprobes.c, I found there maybe a bug:
1. "check_safety" in "kernel/kprobes.c" call thaw_processes if both
CONFIG_PREEMPT and CONFIG_PM defined,
2. "thaw_processes" function is implemented in "kernel/power/process.c",
3. but it is only used if CONFIG_FREEZER defined, from <linux/freezer.h>,
4. else (CONFIG_FREEZER undefined) it's a null macro defined in
<linux/freezer.h>,
5. but process.o only get compile if CONFIG_PM_SLEEP defined, from
"kernel/power/Makefile",
Now I'm confused on how to resolve this?
What's the relation of PM, PM_SLEEP, and FREEZER?
Which modification of the following will be better?
1. modify kernel/Kconfig, let KPROBES depends more?
2. modify kernel/kprobes.c, let the conditional compile depends more?
3. modify include/linux/freezer.h, move thaw_processes to include/linux/pm.h?
4. modify kernel/power/Makefile, let kernel/power/process.c compile on
less condition?
Furthermore, there seems no entry for maintainers of "kernel/power/",
who maintain that subdir please add your name to the MAINTAINERS file?
I just grab some latest touchers of kernel/power/ and kernel/kprobes.c
as the recipients here.
--
Cheng Renquan (程任全), Shenzhen, China
Eddie Izzard - "I grew up in Europe, where the history comes from."
Powered by blists - more mailing lists