Re: File opening by Kernel threads

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

 



On Sat, Jul 12, 2003 at 09:14:49PM -0700, kernel rakshakudu wrote:
> Hi,
> I am writing a kernel thread which opens a file and
> writes into it everytime in a continous loop. The
> Kernel thread is started by a system call. 
> 
> The problem is the file openning by Kernel thread
> fails and sys_open() returns -14 (EFAULT). Can any
> body help me in this ??? Also if you know any url
> where there is good discussion or documentation of
> kernel threads, keventd , let me know. 

Generally speaking, you never ever want to call sys_*
In this case you want to call filp_open directly (and work with struct
filp *, not a file descriptor - you don't have a descriptor table).

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
--
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