[uClibc 0005644]: delete_module() syscall problem
bugs at busybox.net
bugs at busybox.net
Wed Oct 22 08:20:56 UTC 2008
A NOTE has been added to this issue.
======================================================================
http://busybox.net/bugs/view.php?id=5644
======================================================================
Reported By: zaphod
Assigned To: uClibc
======================================================================
Project: uClibc
Issue ID: 5644
Category: Other
Reproducibility: always
Severity: minor
Priority: normal
Status: assigned
======================================================================
Date Submitted: 10-22-2008 01:10 PDT
Last Modified: 10-22-2008 01:20 PDT
======================================================================
Summary: delete_module() syscall problem
Description:
There are two different versions of delete_module() for Linux kernel 2.4
and 2.6. Under 2.4 it is
int delete_module(const char *name);
under 2.6 it is
int delete_module(const char *name, unsigned int flags);
If someone tries to pass an O_NONBLOCK option to a 2.6 kernel, this option
gets lost.
Maybe the implementation should be changed to pass the second parameter to
the kernel. This will not hurt on 2.4, since the kernel will simply ignore
the second parameter and it will help under 2.6. A diff could look as
follows:
--- delete_module.c.orig 2008-10-22 10:06:19.493311752 +0200
+++ delete_module.c 2008-10-22 10:07:22.295347373 +0200
@@ -7,11 +7,11 @@
*/
#include <sys/syscall.h>
-int delete_module(const char *name);
+int delete_module(const char *name, unsigned int flags);
#ifdef __NR_delete_module
-_syscall1(int, delete_module, const char *, name);
+_syscall1(int, delete_module, const char *, name, unsigned int, flags);
#elif defined __UCLIBC_HAS_STUBS__
-int delete_module(const char *name)
+int delete_module(const char *name, unsigned int flags)
{
__set_errno(ENOSYS);
return -1;
======================================================================
----------------------------------------------------------------------
bernhardf - 10-22-08 01:20
----------------------------------------------------------------------
close (syscall2, not 1). Can you, by chance, try this
delete-module-syscall2.patch with a 2.4 kernel?
Issue History
Date Modified Username Field Change
======================================================================
10-22-08 01:10 zaphod New Issue
10-22-08 01:10 zaphod Status new => assigned
10-22-08 01:10 zaphod Assigned To => uClibc
10-22-08 01:13 zaphod Issue Monitored: zaphod
10-22-08 01:15 zaphod Issue End Monitor: zaphod
10-22-08 01:20 bernhardf File Added: delete-module-syscall2.patch
10-22-08 01:20 bernhardf Note Added: 0013944
======================================================================
More information about the uClibc-cvs
mailing list