I wrote a small loop (below) that I inserted into schedule
just before it switches to the new process. Suprisingly,
the printk is printed quite often -- which means that we are
switching into a process whose open_fds map includes bits which
do not correspond to open entries in the fd array.
There is a simple fix to close_files to make it check for
null fd[] entries, but I fear that that may mask some underlying
problem.
Any ideas?
Philip
{
struct files_struct *ff = next->files;
int fd;
if (next && ff && next->pid > 100) {
for (fd = 0; fd < 64; fd++) {
if (!ff->fd[fd] && FD_ISSET(fd, &ff->open_fds)) {
printk("problems with fd and files, pid=%d,
ff=%p, fd=%d, open_fds[0]=%08x\n",
next->pid, ff, fd, ff->open_fds.fds_bits[0]);
break;
}
}
}
}
-- Philip Gladstone +1 781 530 2461 Raptor Systems / Axent Technologies Waltham, MA http://www.raptor.com/- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu