Re: In a process context kernel_read returns -EINTR, how to proceed?

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

 



Hi Valdis,

I need to read file  inside LSM hook and I can not do it in user space
I forgot o mention that same error occurried  both in 4.4 and 4.13 kernels
 What alternative you can recommend to read file in kernel and avoid -EINTR?
Is vfs_read() different from kernel_read() ?

ThanX
Lev

20.12.2018, 23:09, "valdis.kletnieks@xxxxxx" <valdis.kletnieks@xxxxxx>:
> On Thu, 20 Dec 2018 13:33:09 +0300, Lev Olshvang said:
>>  I use kernel_read to read file in chunks of 4K size in a process context
>>  On several files, like libc, libm, I got -EINTR error.
>
> What are you trying to accomplish? This is not a recommended way to do things.
>
>>  I do not understand who may interrupt such a small read, I suppose these
>>  libraries are already mapped in other processes so no real I/O should be done.
>
> That should be a hint....
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@xxxxxxxxxxxxxxxxx
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[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