Package: module-init-tools
Version: 3.3-pre4-2
Severity: important
When some process set read lock on kernel module file, modprobe cannot
load this module.
For example:
flock.c:
----------------------------------------------------------------------
#include <sys/file.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
int main ( int argc, char ** argv ){
struct flock fl;
int fd = -1;
printf("lock %s\n", argv[1]);
fd = open( argv[1], O_RDONLY );
if ( fd == -1 ){
perror("Open: ");
return errno;
} else {
printf ("Open ok, fd is %d\n", fd);
}
fl.l_type = F_RDLCK;
fl.l_whence = SEEK_SET;
fl.l_start = 0;
fl.l_len = 1;
if ( fcntl(fd, F_SETLK, &fl ) != 0 ){
perror("fcntl: ");
return errno;
} else {
printf("fd %d is locked %d\n", fd, f );
}
while( 1 ) {
sleep(100);
printf( "file is locked\n");
}
close(fd);
return 0;
}
-----------------------------------------------------------------------
If this program running with command
$ ./flock /lib/modules/2.6.19/kernel/drivers/input/misc/pcspkr.ko
then command
# modprobe pcspkr
will not be completed.
# strace modprobe pcspkr
[...]
fcntl64(3, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}
<unfinished ...>
-- System Information:
Debian Release: 4.0
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.19
Locale: LANG=be_BY.CP1251, LC_CTYPE=be_BY.CP1251 (charmap=CP1251)
Versions of packages module-init-tools depends on:
ii libc6 2.3.6.ds1-13 GNU C Library: Shared libraries
ii lsb-base 3.1-23.1 Linux Standard Base 3.1 init scrip
module-init-tools recommends no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]