[BusyBox 0005634]: rmmod hangs when trying to remove a busy kernel module using delete_module() from µClibc

bugs at busybox.net bugs at busybox.net
Wed Oct 22 07:46:46 UTC 2008


The following issue has been SUBMITTED. 
====================================================================== 
http://busybox.net/bugs/view.php?id=5634 
====================================================================== 
Reported By:                zaphod
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   5634
Category:                   Kernel Module Support
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             10-22-2008 00:46 PDT
Last Modified:              10-22-2008 00:46 PDT
====================================================================== 
Summary:                    rmmod hangs when trying to remove a busy kernel
module using delete_module() from µClibc
Description: 
Busybox uses delete_module() to remove a kernel module. It assumes
delete_module() to be a function with the following prototype:

    int delete_module(const char *module, unsigned int flags);

Unfortunatly µClibc provides delete_module() as follows:

    int delete_module(const char *name);

The flags containing O_NONBLOCK gets lost on the way to the kernel and
rmmod hangs.

To fix this simply fall back to busybox own implementation, which is used
in all cases except for µClibc:

#ifdef __UCLIBC__
extern int delete_module(const char *module, unsigned int flags);
#else
# include <sys/syscall.h>
# define delete_module(mod, flags) syscall(__NR_delete_module, mod,
flags)
#endif


====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
10-22-08 00:46  zaphod         New Issue                                    
10-22-08 00:46  zaphod         Status                   new => assigned     
10-22-08 00:46  zaphod         Assigned To               => BusyBox         
======================================================================




More information about the busybox-cvs mailing list