Re: opening a file inside the kernel module

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

 



Hi Amith,
Thanx a lot for ur prompt reply.
I want to implement socket from the module. I won't be having any user
process running to handle the descriptors coming from socket. Could you pl
tell me how to handle the socket descriptor from the kernel module?
Thanx,
rakesh

----- Original Message -----
From: "Amith" <amith@xxxxxxxxxxxxxxx>
To: <kernelnewbies@xxxxxxxxxxxx>
Cc: "Rakesh Jagota" <j.rakesh@xxxxxxxxxxxxx>
Sent: Wednesday, September 29, 2004 11:07 AM
Subject: Re: opening a file inside the kernel module


> Rakesh Jagota wrote:
> >
> > Hi all,
> > I am working in linux, i would like to know abt whether can I open a
file
> > inside the kernel module without using any application. If so how how
the
> > files_struct will be maintained. Does a kernel module has this struct?
> >
> > Waiting for any suggestion from the list.
> >
> > Thanks in advance,
> > rakesh
> >
> > --
> > Kernelnewbies: Help each other learn about the Linux kernel.
> > Archive:       http://mail.nl.linux.org/kernelnewbies/
> > FAQ:           http://kernelnewbies.org/faq/
>
>
> hi there,
>               when your module is used by a process , it runs in that
process context then it ( the process which used
> your module) has a files_struct which is updated when you open a file from
inside the kernel . A module doesnt have a
> files_struct on its own , cause it is not a process and doesnt have s
task_struct too ( doesn't need one ) .
>
> cheers,
> Amith
>
> PS: Opening a file from inside the kernel is not a good idea anyway .
>


--
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