files_struct->max_fds is 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have been writing a kernel module that intercepts the socket system call. I made my own versions of the SYS_SENDTO functions by making copies of them from socket.c. Unfortunately, I seem to be stuck getting the inode that corresponds with the file descriptor sent in. Normally, it uses fget(fd), but I wasn't getting back anything valid. I checked that function and saw it uses fcheck(fd) which checks current->files->max_fds. I think the problem is here in that max_fds is 0. I have done some test on current, and pid, uid, etc seem ok, but all the information in current->files seems to be the default(initialized) data.

Any help would be appreciated.
Jason Stredwick

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux