BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005644 [uClibc] Other minor always 10-22-08 01:10 10-22-08 01:47
Reporter zaphod View Status public  
Assigned To uClibc
Priority normal Resolution fixed  
Status closed   Product Version 0.9.30
Summary 0005644: 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;

Additional Information
Attached Files  delete-module-syscall2.patch [^] (730 bytes) 10-22-08 01:20

- Relationships

- Notes
(0013944)
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?
 
(0013954)
bernhardf
10-22-08 01:47

Fixed in r23762. Thanks!
 

- 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
10-22-08 01:47 bernhardf Status assigned => closed
10-22-08 01:47 bernhardf Note Added: 0013954
10-22-08 01:47 bernhardf Resolution open => fixed
10-22-08 01:47 bernhardf Fixed in Version  => 0.9.30


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker