create_proc_entry and !CONFIG_PROC_FS
From: Adrian Bunk (bunk_at_fs.tum.de)
Date: 08/31/03
- Previous message: Andrea Arcangeli: "Re: Andrea VM changes"
- Next in thread: Andrew Morton: "Re: create_proc_entry and !CONFIG_PROC_FS"
- Reply: Andrew Morton: "Re: create_proc_entry and !CONFIG_PROC_FS"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 31 Aug 2003 17:06:32 +0200 To: linux-kernel@vger.kernel.org
Hi,
I've observed a possible problem with create_proc_entry and
!CONFIG_PROC_FS.
If !CONFIG_PROC_FS include/linux/proc_fs.h includes a dummy
create_proc_entry that simply returns NULL.
Unfortunately, many callers of this function do things like e.g.
static int __init br2684_init(void)
{
struct proc_dir_entry *p;
if ((p = create_proc_entry("br2684", 0, atm_proc_root)) == NULL)
return -ENOMEM;
p->proc_fops = &br2684_proc_operations;
br2684_ioctl_set(br2684_ioctl);
return 0;
}
IOW, the dummy create_proc_entry fixes the compilation but the init
function always returns -ENOMEM if !CONFIG_PROC_FS.
Is there any better solution than removing the dummy create_proc_entry
and #ifdef'ing all places where it's used?
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Andrea Arcangeli: "Re: Andrea VM changes"
- Next in thread: Andrew Morton: "Re: create_proc_entry and !CONFIG_PROC_FS"
- Reply: Andrew Morton: "Re: create_proc_entry and !CONFIG_PROC_FS"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: [RFC] rwsem removal from kobj_map
... static int __init genhd_device_init ... static void cdev_default_release
... send the line "unsubscribe linux-kernel" in ... (Linux-Kernel) - [PATCH] kmap: remove usage of rwsem from kobj_map.
... static int __init genhd_device_init ... static void cdev_default_release
... send the line "unsubscribe linux-kernel" in ... (Linux-Kernel) - Re: [PATCH] Removes unnecessary if statement from /drivers/block/z2ram.c
... For what gain? ... There had been need of rain for many days. ...
send the line "unsubscribe linux-kernel" in ... (Linux-Kernel) - drivers/acpi/video.c: null pointer dereference
... The Coverity checker found the following null pointer dereference in ... There
had been need of rain for many days. ... send the line "unsubscribe linux-kernel"
in ... (Linux-Kernel) - Re: [PATCH] preset loops_per_jiffy for faster booting
... static int __init debug_kernel ... +menuconfig FASTBOOT ... send
the line "unsubscribe linux-kernel" in ... (Linux-Kernel)