Re: working files from Interupt routine

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

 



El Thu, Jan 17, 2008 at 05:49:32PM +0530 Kathiresan, Lekshmanan ha dit:

> 
>          I have written code to create ordinary file from Linux kernel
>    module. This code is working fine in normal execution, but its hangs when
>    this function called from hook function or ISR.
> 
>    Please advice me, what should I do to solve this problem.
> 
>        Suppose if I remove variable arguments from this function. Its give
>    error "Failed to write". This problem comes only when I call from hook or
>    ISR.

Writing a file from an ISR doesn't sound like a good idea to me. I
suppose your problem is that your code blocks in vfs_write() or one of
the other calls that might block. I think you'd do better writing to a
(preallocated) buffer and write this buffer in a non-atomic context
where sleeping is allowed.

-- 
Matthias Kaehlcke
Linux System Developer
Barcelona

     The assumption that what currently exists must necessarily
      exist is the acid that corrodes all visionary thinking
                                                                 .''`.
    using free software / Debian GNU/Linux | http://debian.org  : :'  :
                                                                `. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4                  `-

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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